summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorAlexander Richardson <[email protected]>2020-09-04 04:06:03 +0100
committerGitHub <[email protected]>2020-09-03 20:06:03 -0700
commitf3064162ba41778577b7fb72930d6c207743ec5c (patch)
tree8b8667a7e1170b87e3ac10e586c8ec013d699231 /lib
parentac6e5fb202a95277cd7886eb7b6acc3ec53d8def (diff)
Fixes for running FreeBSD buildworld on Linux/macOS hosts
Adding an #ifdef __FreeBSD__ to a FreeBSD-specific header may seem odd, but these headers are used on non-FreeBSD systems during the bootstrap tools phase. Originally submitted downstream as https://reviews.freebsd.org/D26193 Reviewed-by: Ryan Moeller <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Alex Richardson <[email protected]> Closes #10863
Diffstat (limited to 'lib')
-rw-r--r--lib/libspl/include/os/freebsd/sys/stat.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/libspl/include/os/freebsd/sys/stat.h b/lib/libspl/include/os/freebsd/sys/stat.h
index 82c86262f..07f9762f0 100644
--- a/lib/libspl/include/os/freebsd/sys/stat.h
+++ b/lib/libspl/include/os/freebsd/sys/stat.h
@@ -28,6 +28,8 @@
#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 */
#define stat64 stat
@@ -68,4 +70,5 @@ fstat64_blk(int fd, struct stat64 *st)
return (0);
}
+#endif /* defined(__FreeBSD__) */
#endif /* _LIBSPL_SYS_STAT_H */