mirror of
https://github.com/freebsd/freebsd-src.git
synced 2026-10-28 11:25:21 +01:00
libmagic: Add swap.c and magic.h to SRCS.
file 5.48 added swap.c and swap.h for byte-swapping operations, which are
required on hosts that lack <byteswap.h> or <sys/bswap.h> (e.g. macOS cross-building
or older FreeBSD bootstrap environments).
Also add magic.h to SRCS so object files depend on the generated header
before compiling, avoiding falling back to the host's /usr/include/magic.h
during parallel builds.
Reported by: wosch
MFC after: 1 week
Fixes: 7af41682a9 ("MFV: file 5.48")
This commit is contained in:
1 parent
76f5fccc5f
commit
8929675e11
1 file changed
+4
-2
@@ -19,7 +19,9 @@ SRCS= apprentice.c apptype.c ascmagic.c buffer.c cdf.c cdf_time.c \
|
||||
compress.c der.c encoding.c fsmagic.c funcs.c is_json.c \
|
||||
is_csv.c \
|
||||
is_simh.c \
|
||||
is_tar.c magic.c print.c readcdf.c readelf.c seccomp.c softmagic.c
|
||||
is_tar.c magic.c print.c readcdf.c readelf.c seccomp.c softmagic.c \
|
||||
swap.c
|
||||
SRCS+= magic.h
|
||||
INCS= magic.h
|
||||
|
||||
MAGICPATH?= /usr/share/misc
|
||||
@@ -62,7 +64,7 @@ CLEANFILES+= mkmagic
|
||||
DEPENDOBJS+= mkmagic
|
||||
build-tools: mkmagic
|
||||
# For the non-dirdeps build, HOST_CC is CC by default
|
||||
mkmagic: apprentice.c cdf_time.c encoding.c funcs.c magic.c print.c ${INCS} ${BUILD_TOOLS_META}
|
||||
mkmagic: apprentice.c cdf_time.c encoding.c funcs.c magic.c print.c swap.c ${INCS} ${BUILD_TOOLS_META}
|
||||
${HOST_CC:N${CCACHE_BIN}} ${CFLAGS} -DCOMPILE_ONLY ${LDFLAGS} -o ${.TARGET} \
|
||||
${.ALLSRC:N*.h:O:u} ${LDADD}
|
||||
|
||||
|
||||
Reference in new issue
Block a user