Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support running FreeBSD buildworld on Arm-based macOS hosts #11771

Merged
merged 1 commit into from
Mar 26, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions lib/libspl/include/os/freebsd/sys/stat.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
#include_next <sys/stat.h>

/* Note: this file can be used on linux/macOS when bootstrapping tools. */

#if defined(__FreeBSD__)
#include <sys/mount.h> /* for BLKGETSIZE64 */

Expand Down Expand Up @@ -71,4 +72,14 @@ fstat64_blk(int fd, struct stat64 *st)
return (0);
}
#endif /* defined(__FreeBSD__) */

/*
* Only Intel-based Macs have a separate stat64; Arm-based Macs are like
* FreeBSD and have a full 64-bit stat from the start.
*/
#if defined(__APPLE__) && !(defined(__i386__) || defined(__x86_64__))
#define stat64 stat
#define fstat64 fstat
#endif

#endif /* _LIBSPL_SYS_STAT_H */