path: root/tools/build/Makefile
diff options
Diffstat (limited to 'tools/build/Makefile')
1 files changed, 12 insertions, 1 deletions
diff --git a/tools/build/Makefile b/tools/build/Makefile
index 00f5e3e45337..8c723e8be73c 100644
--- a/tools/build/Makefile
+++ b/tools/build/Makefile
@@ -153,6 +153,15 @@ SYSINCS+= ${SRCTOP}/sys/sys/nlist_aout.h
.if ${.MAKE.OS} != "FreeBSD"
.PATH: ${.CURDIR}/cross-build
+# Needed by our sys/types.h wrapper
+SYSINCS+= ${SRCTOP}/sys/sys/bitcount.h
+# macOS's bitstring lacks FreeBSD-specific additions used by makefs's ZFS code
+# and Linux doesn't have it at all.
+INCS+= ${SRCTOP}/include/bitstring.h
+SYSINCS+= ${SRCTOP}/sys/sys/bitstring.h
# dbopen() behaves differently on Linux and FreeBSD so we ensure that we
# bootstrap the FreeBSD db code. The cross-build headers #define dbopen() to
# __freebsd_dbopen() so that we don't ever use the host version
@@ -181,6 +190,8 @@ SRCS+= rpmatch.c
# On Linux, glibc does not provide strlcpy,strlcat or strmode.
.PATH: ${LIBC_SRCTOP}/string
SRCS+= strlcpy.c strlcat.c strmode.c
+# On Linux, glibc provides ffs* but not fls*
+SRCS+= fls.c flsl.c flsll.c
# Compile the fgetln/fgetwln/closefrom fallback code from libbsd:
SRCS+= fgetln_fallback.c fgetwln_fallback.c closefrom.c
@@ -240,7 +251,7 @@ DISKINCS+= ${SRCTOP}/sys/sys/disk/bsd.h
# Needed to build config (since it uses libnv)
SYSINCS+= ${SRCTOP}/sys/sys/nv.h ${SRCTOP}/sys/sys/cnv.h \
- ${SRCTOP}/sys/sys/dnv.h
+ ${SRCTOP}/sys/sys/dnv.h ${SRCTOP}/sys/sys/nv_namespace.h
# Needed when bootstrapping ldd (since it uses DF_1_PIE)
SYSINCS+= ${SRCTOP}/sys/sys/elf32.h