build: Fixes for arm64 macOS

* macOS ships an ancient version of GNU Bison which wants
  an '=' after %name-prefix

* macOS awk doesn't support strftime, so try to find a working
  awk.

* _haiku_build_{open,openat,fcntl} are declared and defined with
  different prototypes (variadic vs non-variadic). This is bad
  on its own, but it "happens to" work on most platforms since
  variadic parameters are usually passed in registers, same as other
  arguments. On arm64 macOS, variadic parameters are always passed
  on the stack, so you get weird and confusing bugs when using
  these functions.

Change-Id: I8cee9ecac0ac9b039be6b7e35ceaf8ad7c0f4c44
Reviewed-on: https://review.haiku-os.org/c/haiku/+/10468
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
This commit is contained in:
Sam Roberts
2026-03-11 02:21:34 +00:00
committed by waddlesplash
parent a2e4f9f75f
commit 5bb69a0f33
6 changed files with 48 additions and 20 deletions
-7
View File
@@ -111,16 +111,9 @@ int _haiku_build_fchownat(int fd, const char* path, uid_t owner,
gid_t group, int flag);
int _haiku_build_mknodat(int fd, const char* name, mode_t mode, dev_t dev);
int _haiku_build_creat(const char* path, mode_t mode);
#ifndef _HAIKU_BUILD_DONT_REMAP_FD_FUNCTIONS
int _haiku_build_open(const char* path, int openMode, ...);
int _haiku_build_openat(int fd, const char* path, int openMode, ...);
int _haiku_build_fcntl(int fd, int op, ...);
#else
int _haiku_build_open(const char* path, int openMode, mode_t permissions);
int _haiku_build_openat(int fd, const char* path, int openMode,
mode_t permissions);
int _haiku_build_fcntl(int fd, int op, int argument);
#endif
int _haiku_build_renameat(int fromFD, const char* from, int toFD,
const char* to);