aboutsummaryrefslogtreecommitdiff
path: root/lib/libspl/include/os/freebsd/sys/stat.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libspl/include/os/freebsd/sys/stat.h')
-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 82c86262fff3..07f9762f09ee 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 */