Date: Sat, 3 Apr 2021 11:29:41 GMT From: Jessica Clarke <jrtc27@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Subject: git: 7f8acc8d3d3a - stable/13 - zfs: Cherry-pick upstream commit ef977fce6636 to fix macOS/arm64 bootstrap Message-ID: <202104031129.133BTfvY068095@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch stable/13 has been updated by jrtc27: URL: https://cgit.FreeBSD.org/src/commit/?id=7f8acc8d3d3a5094cd4055f39ad05fc753a90707 commit 7f8acc8d3d3a5094cd4055f39ad05fc753a90707 Author: Jessica Clarke <jrtc27@FreeBSD.org> AuthorDate: 2021-03-27 02:23:59 +0000 Commit: Jessica Clarke <jrtc27@FreeBSD.org> CommitDate: 2021-04-03 11:29:31 +0000 zfs: Cherry-pick upstream commit ef977fce6636 to fix macOS/arm64 bootstrap Upstream commit message: Support running FreeBSD buildworld on Arm-based macOS hosts Arm-based Macs are like FreeBSD and provide a full 64-bit stat from the start, so have no stat64 variants. Thus, define stat64 and fstat64 as aliases for the normal versions. Reviewed-by: Ryan Moeller <ryan@iXsystems.com> Signed-off-by: Jessica Clarke <jrtc27@jrtc27.com> Closes #11771 (cherry picked from commit 3a314eb5bb444ec019457e5aefaabb656fcb3d54) --- sys/contrib/openzfs/lib/libspl/include/os/freebsd/sys/stat.h | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/sys/contrib/openzfs/lib/libspl/include/os/freebsd/sys/stat.h b/sys/contrib/openzfs/lib/libspl/include/os/freebsd/sys/stat.h index 07f9762f09ee..38c684d62a1b 100644 --- a/sys/contrib/openzfs/lib/libspl/include/os/freebsd/sys/stat.h +++ b/sys/contrib/openzfs/lib/libspl/include/os/freebsd/sys/stat.h @@ -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 */ @@ -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 */
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202104031129.133BTfvY068095>