Skip to content

Commit b667280

Browse files
ayrtonmDimitryAndric
authored andcommitted
cross-build: Avoid adding <sys/cdefs.h> to SYSINCS
Summary: The sys/cdefs.h in src is incompatible with glibc's sys/cdefs.h so cross-building broke when the former was added to SYSINCS in 1c9ff80. This commit adds a guard around that to only do that when building on FreeBSD. This should fix github CI. Test Plan: Ran buildkernel using tools/build/make.py on linux in github CI and locally on FreeBSD to double check nothing broke. Reviewed by: dim MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D54385
1 parent 3088263 commit b667280

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

tools/build/Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -351,10 +351,12 @@ MSDOSFSINCS+= ${SRCTOP}/sys/fs/msdosfs/fat.h
351351
MSDOSFSINCS+= ${SRCTOP}/sys/fs/msdosfs/msdosfsmount.h
352352
DISKINCS+= ${SRCTOP}/sys/sys/disk/bsd.h
353353

354+
.if ${.MAKE.OS} == "FreeBSD"
354355
# Needed to build most of the things below, which include sys/cdefs.h either
355356
# directly or transitively
356357
SYSINCS+= ${SRCTOP}/sys/sys/_visible.h
357358
SYSINCS+= ${SRCTOP}/sys/sys/cdefs.h
359+
.endif
358360

359361
# Needed to build config (since it uses libnv)
360362
SYSINCS+= ${SRCTOP}/sys/sys/_nv.h

0 commit comments

Comments
 (0)