All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Sandeen <sandeen@redhat.com>
To: linux-xfs <linux-xfs@vger.kernel.org>
Cc: Brian Norris <briannorris@chromium.org>
Subject: [PATCH] xfsprogs: don't include all xfs headers just for crc32
Date: Wed, 10 Oct 2018 15:55:32 -0500	[thread overview]
Message-ID: <e1259a8b-b5aa-cfa2-aeab-13d63757d7a5@redhat.com> (raw)

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"
 

             reply	other threads:[~2018-10-11  4:19 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-10 20:55 Eric Sandeen [this message]
2018-10-11 19:59 ` [PATCH] xfsprogs: don't include all xfs headers just for crc32 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e1259a8b-b5aa-cfa2-aeab-13d63757d7a5@redhat.com \
    --to=sandeen@redhat.com \
    --cc=briannorris@chromium.org \
    --cc=linux-xfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.