From: Eric Sandeen Date: Wed, 17 Oct 2018 18:24:56 +0000 (-0500) Subject: xfsprogs: don't include all xfs headers just for crc32 X-Git-Tag: v4.19.0-rc1~31 X-Git-Url: http://git.ipfire.org/?p=thirdparty%2Fxfsprogs-dev.git;a=commitdiff_plain;h=b65718551f954c41e99a95ea2ca8d4bf2d0a6248 xfsprogs: don't include all xfs headers just for crc32 Brian Norris reported that "The $BUILD_CC toolchain might have an older set of Linux headers than the $CC toolchain. It's generally unsafe to try to build both with the same definitions, but in particular, this one can cause compilation failures in the local crc32selftest build: [failure to find fsmap.h]" It seems like the most straightforward thing to do here is include a specific set of system headers, instead of pulling in the whole xfs.h header chain which has multiple tests and definitions in place for headers that may or may not be there during the build. Reported-by: Brian Norris Signed-off-by: Eric Sandeen Tested-by: Brian Norris Reviewed-by: Darrick J. Wong Signed-off-by: Eric Sandeen --- diff --git a/libfrog/crc32.c b/libfrog/crc32.c index 1d52f683a..220b33bf1 100644 --- a/libfrog/crc32.c +++ b/libfrog/crc32.c @@ -29,8 +29,11 @@ * match the hardware acceleration available on Intel CPUs. */ +#include +#include +#include #include "platform_defs.h" -#include "xfs.h" +/* For endian conversion routines */ #include "xfs_arch.h" #include "crc32defs.h"