]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commit
xfsprogs: don't include all xfs headers just for crc32
authorEric Sandeen <sandeen@redhat.com>
Wed, 17 Oct 2018 18:24:56 +0000 (13:24 -0500)
committerEric Sandeen <sandeen@redhat.com>
Wed, 17 Oct 2018 18:24:56 +0000 (13:24 -0500)
commitb65718551f954c41e99a95ea2ca8d4bf2d0a6248
tree93e5b8938a1543a3f523bec62f0bd7c1bde4a740
parent29370436c1d426e51d644f1358dcc04e03791a5a
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 <briannorris@chromium.org>
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Tested-by: Brian Norris <briannorris@chromium.org>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
libfrog/crc32.c