linux-xfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] xfsprogs: don't include all xfs headers just for crc32
@ 2018-10-10 20:55 Eric Sandeen
  2018-10-11 19:59 ` Brian Norris
  0 siblings, 1 reply; 6+ messages in thread
From: Eric Sandeen @ 2018-10-10 20:55 UTC (permalink / raw)
  To: linux-xfs; +Cc: Brian Norris

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>
---

Brian, here's try #3, does this also work for you?

diff --git a/libfrog/crc32.c b/libfrog/crc32.c
index 1d52f68..220b33b 100644
--- a/libfrog/crc32.c
+++ b/libfrog/crc32.c
@@ -29,8 +29,11 @@
  * match the hardware acceleration available on Intel CPUs.
  */
 
+#include <inttypes.h>
+#include <asm/types.h>
+#include <sys/time.h>
 #include "platform_defs.h"
-#include "xfs.h"
+/* For endian conversion routines */
 #include "xfs_arch.h"
 #include "crc32defs.h"
 

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2018-10-18  1:15 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-10-10 20:55 [PATCH] xfsprogs: don't include all xfs headers just for crc32 Eric Sandeen
2018-10-11 19:59 ` Brian Norris
2018-10-11 22:36   ` Eric Sandeen
2018-10-11 22:45     ` Darrick J. Wong
2018-10-17 17:18       ` Darrick J. Wong
2018-10-11 23:08     ` Brian Norris

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).