Skip to contentSkip to conversation

xfsprogs for-next build error on Debian Wheezy / amd64

DISCUSSION Christoph Hellwig 3 participants 12 messages Jun 10, 2015 – Jun 17, 2015 Kbuild

lore
Share & tools
lore
#0 lore raw
hch@brick:~/work/xfsprogs$ make
Building include
Building libxfs
    [TEST]    CRC32
In file included from crc32.c:61:0:
crc32table.h:4:1: error: ‘__le32’ undeclared here (not in a
function)
crc32table.h:4:1: error: expected expression before ‘__u32’
crc32table.h:4:20: error: expected expression before ‘__u32’
crc32table.h:4:39: error: expected expression before ‘__u32’
crc32table.h:4:58: error: expected expression before ‘__u32’
crc32table.h:5:1: error: expected expression before ‘__u32’
crc32table.h:5:20: error: expected expression before ‘__u32’
crc32table.h:5:39: error: expected expression before ‘__u32’
crc32table.h:5:58: error: expected expression before ‘__u32’

... and so on

Seems like we're not getting the right headers included in this generated file, but I'm lost on what exactly is the error.

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs

#1 lore raw
Quoted 16 lines · Christoph Hellwig
hch@brick:~/work/xfsprogs$ make
Building include
Building libxfs
    [TEST]    CRC32
In file included from crc32.c:61:0:
crc32table.h:4:1: error: ‘__le32’ undeclared here (not in a
function)
crc32table.h:4:1: error: expected expression before ‘__u32’
crc32table.h:4:20: error: expected expression before ‘__u32’
crc32table.h:4:39: error: expected expression before ‘__u32’
crc32table.h:4:58: error: expected expression before ‘__u32’
crc32table.h:5:1: error: expected expression before ‘__u32’
crc32table.h:5:20: error: expected expression before ‘__u32’
crc32table.h:5:39: error: expected expression before ‘__u32’
crc32table.h:5:58: error: expected expression before ‘__u32’
Quoted 4 lines

... and so on

Seems like we're not getting the right headers included in this generated file, but I'm lost on what exactly is the error.

Does the problem go away after a 'make distclean'?

Cheers,

Dave.

Signature · 7 lines
Dave Chinner
[email protected]

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs
#2 lore raw
Quoted 1 line · Dave Chinner

Does the problem go away after a 'make distclean'?

No. Neither a distclean nor a fresh clone fixes the issue.

Also disabling the crc32ctest target I get similar error in other code.

Note that the master branch is doing fine.

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs

#3 lore raw
Quoted 9 lines · Christoph Hellwig
Quoted 1 line · Dave Chinner

Does the problem go away after a 'make distclean'?

No. Neither a distclean nor a fresh clone fixes the issue.

Also disabling the crc32ctest target I get similar error in other code.

Note that the master branch is doing fine.

I've biscted it to:

commit 2fe8a24dda8a2942a1168c745bf6743ae21991c0

Author: Dave Chinner <[email protected]>
Date:   Fri Jun 5 10:13:30 2015 +1000

libxfs: restructure to match kernel layout

but I still don't understand why it happens.

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs

#4 lore raw
In reply to Christoph Hellwig
Quoted 9 lines · Christoph Hellwig
Quoted 1 line · Dave Chinner

Does the problem go away after a 'make distclean'?

No. Neither a distclean nor a fresh clone fixes the issue.

Also disabling the crc32ctest target I get similar error in other code.

Note that the master branch is doing fine.

Yeah, it's to do with the libxfs restructure in the for-next branch to ring it up to the same as the 4.1 kernel. Can you dump the output of 'ls -l include/xfs' and attach your include/platform_defs.h file?

Cheers,

Dave.

Signature · 7 lines
Dave Chinner
[email protected]

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs
#5 lore raw

Here is the fix. Since that commit the build accidentally relied on the installed platform_defs.h:

---

Quoted 1 line

From e406bcdcdad80ca491d5b854cde5ad893bef6f8c Mon Sep 17 00:00:00 2001

From: Christoph Hellwig <[email protected]>
Date: Wed, 10 Jun 2015 10:34:45 +0200
Subject: xfsprogs: fix platform_defs.h include path
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Since 2fe8a2 ("libxfs: restructure to match kernel layout") platform_defs.h the xfs subdirectory under include/ only contains selected headers instead of being a directory symlink.

Because of this the build does not properly pick up platform_defs.h, which isn't symlinked into include/xfs. Builds only work if a recent enough platform_defs.h is available under /usr/include/xfs.

Fix this by including platform_defs.h without the xfs/ prefix.

---
 include/libxfs.h        | 2 +-
 include/xfs.h           | 2 +-
 libxfs/Makefile         | 2 +-
 libxfs/crc32.c          | 3 +--
 libxfs/gen_crc32table.c | 6 +++---
 libxfs/libxfs_priv.h    | 2 +-
 libxfs/radix-tree.c     | 2 +-
 7 files changed, 9 insertions(+), 10 deletions(-)
include/libxfs.h +1 -1
index e12cd5a..ee537f3 100644
@@ -20,7 +20,7 @@
 #define __LIBXFS_H__
 
 #include <xfs/libxfs_api_defs.h>
-#include <xfs/platform_defs.h>
+#include <platform_defs.h>
 
 #include <xfs/list.h>
 #include <xfs/hlist.h>
include/xfs.h +1 -1
index e32c4a8..3f17b8f 100644
@@ -33,7 +33,7 @@
 #ifndef __XFS_H__
 #define __XFS_H__
 
-#include <xfs/platform_defs.h>
+#include <platform_defs.h>
 #include <xfs/xfs_types.h>
 #include <xfs/xfs_fs.h>
 
libxfs/Makefile +1 -1
index a3c9ab5..b1fc86d 100644
@@ -102,7 +102,7 @@ DEBUG = -DNDEBUG
 
 LDIRT = gen_crc32table crc32table.h crc32selftest
 
-default: xfs crc32selftest ltdepend $(LTLIBRARY)
+default: xfs ltdepend $(LTLIBRARY)
 
 crc32table.h: gen_crc32table.c
 	@echo "    [CC]     gen_crc32table"
libxfs/crc32.c +1 -2
index 0a8d309..006faf2 100644
@@ -33,8 +33,7 @@
  * match the hardware acceleration available on Intel CPUs.
  */
 
-//#include <libxfs.h>
-#include <xfs/platform_defs.h>
+#include <platform_defs.h>
 #include <xfs/swab.h>
 #include <xfs/xfs_arch.h>
 #include "crc32defs.h"
libxfs/gen_crc32table.c +3 -3
index 574a2d1..57109ed 100644
@@ -114,7 +114,7 @@ int main(int argc, char** argv)
 
 	if (CRC_LE_BITS > 1) {
 		crc32init_le();
-		printf("static u32 crc32table_le[%d][%d] = {",
+		printf("static uint32_t crc32table_le[%d][%d] = {",
 		       LE_TABLE_ROWS, LE_TABLE_SIZE);
 		output_table(crc32table_le, LE_TABLE_ROWS,
 			     LE_TABLE_SIZE, "tole");
@@ -124,7 +124,7 @@ int main(int argc, char** argv)
 #if 0	/* not used by xfsprogs */
 	if (CRC_BE_BITS > 1) {
 		crc32init_be();
-		printf("static u32 crc32table_be[%d][%d] = {",
+		printf("static uint32_t crc32table_be[%d][%d] = {",
 		       BE_TABLE_ROWS, BE_TABLE_SIZE);
 		output_table(crc32table_be, LE_TABLE_ROWS,
 			     BE_TABLE_SIZE, "tobe");
@@ -133,7 +133,7 @@ int main(int argc, char** argv)
 #endif
 	if (CRC_LE_BITS > 1) {
 		crc32cinit_le();
-		printf("static u32 crc32ctable_le[%d][%d] = {",
+		printf("static uint32_t crc32ctable_le[%d][%d] = {",
 		       LE_TABLE_ROWS, LE_TABLE_SIZE);
 		output_table(crc32ctable_le, LE_TABLE_ROWS,
 			     LE_TABLE_SIZE, "tole");
libxfs/libxfs_priv.h +1 -1
index 72fc4b3..494daf4 100644
@@ -58,7 +58,7 @@
 				 (ip)->d_ops, hdr, loghead)
 
 #include "libxfs_api_defs.h"
-#include <xfs/platform_defs.h>
+#include <platform_defs.h>
 
 #include <xfs/list.h>
 #include <xfs/hlist.h>
libxfs/radix-tree.c +1 -1
index c4b6971..de21527 100644
@@ -18,7 +18,7 @@
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
 
-#include <xfs/platform_defs.h>
+#include <platform_defs.h>
 #include "radix-tree.h"
 
 #ifndef ARRAY_SIZE
Signature · 6 lines
1.9.1

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs
#6 lore raw
Quoted 16 lines · Christoph Hellwig

Here is the fix. Since that commit the build accidentally relied on the installed platform_defs.h:

---
From e406bcdcdad80ca491d5b854cde5ad893bef6f8c Mon Sep 17 00:00:00 2001
From: Christoph Hellwig <[email protected]>
Date: Wed, 10 Jun 2015 10:34:45 +0200
Subject: xfsprogs: fix platform_defs.h include path
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Since 2fe8a2 ("libxfs: restructure to match kernel layout") platform_defs.h the xfs subdirectory under include/ only contains selected headers instead of being a directory symlink.

Quoted 5 lines

Because of this the build does not properly pick up platform_defs.h, which isn't symlinked into include/xfs. Builds only work if a recent enough platform_defs.h is available under /usr/include/xfs.

Fix this by including platform_defs.h without the xfs/ prefix.

Actually, I think that platform_defs.h needs to be symlinked into include/xfs. that was the intent, but I bet I missed it because the build wasn't failing and so I didn't notice that I'd failed to put it into the the include/Makefile rule for installed headers.

Yeah, there we are - the install-dev rule has a specific install rule for platform_defs.h as well, so it was being included in the package builds correctly (i.e. installed in /usr/include/xfs) without being mentioned in the HFILES definition that defines header files to be packaged for /usr/include/xfs....

Patch below (which uncovers another issue to do with include files on the distclean side, but is not fatal and I'll fix tomorrow).

Cheers,

Dave.

Signature · 26 lines
Dave Chinner
[email protected]


xfsprogs: build fails to find platform_defs.h

From: Dave Chinner <[email protected]>

Commit 2fe8a2 ("libxfs: restructure to match kernel layout") failed
to link plaftorm_defs.h into include/xfs, and so the system header
file is used instead if it exists. If it doesn't exist, the n the
build fails.

Classify platform_defs.h as a header file that is installed in the
xfsprogs package into /usr/include/xfs, and remove the special
one-off install rule that puts it into that directory. This also
ensures that a build will always find platform_defs.h in
./include/xfs rather than relying on the system includes to provide
it, hence also solving the build issue.

Reported-by: Christoph Hellwig <[email protected]>
Signed-off-by: Dave Chinner <[email protected]>
---
 include/Makefile | 22 +++++++++++++++++-----
 libxfs/crc32.c   |  7 +++----
 2 files changed, 20 insertions(+), 9 deletions(-)
include/Makefile +17 -5
index 70e43a0..6b9c7f0 100644
@@ -18,8 +18,16 @@
 TOPDIR = ..
 include $(TOPDIR)/include/builddefs
 
-QAHFILES = libxfs.h libxlog.h \
-	atomic.h bitops.h cache.h kmem.h list.h hlist.h parent.h radix-tree.h \
+QAHFILES = libxfs.h \
+	libxlog.h \
+	atomic.h \
+	bitops.h \
+	cache.h \
+	hlist.h \
+	kmem.h \
+	list.h \
+	parent.h \
+	radix-tree.h \
 	swab.h \
 	xfs_arch.h \
 	xfs_btree_trace.h \
@@ -30,8 +38,13 @@ QAHFILES = libxfs.h libxlog.h \
 	xfs_trace.h \
 	xfs_trans.h
 
-HFILES = handle.h jdm.h xqm.h xfs.h
-HFILES += $(PKG_PLATFORM).h
+HFILES = handle.h \
+	jdm.h \
+	$(PKG_PLATFORM).h \
+	platform_defs.h \
+	xfs.h \
+	xqm.h
+
 PHFILES = darwin.h freebsd.h irix.h linux.h gnukfreebsd.h
 DKHFILES = volume.h fstyp.h dvh.h
 LIBHFILES = command.h input.h path.h project.h
@@ -62,7 +75,6 @@ include $(BUILDRULES)
 install-dev: default
 	$(INSTALL) -m 755 -d $(PKG_INC_DIR)
 	$(INSTALL) -m 644 $(HFILES) $(PKG_INC_DIR)
-	$(INSTALL) -m 644 platform_defs.h $(PKG_INC_DIR)
 
 install-qa: install-dev
 	$(INSTALL) -m 644 $(QAHFILES) $(PKG_INC_DIR)
libxfs/crc32.c +3 -4
index 0a8d309..bc1fc98 100644
@@ -33,10 +33,9 @@
  * match the hardware acceleration available on Intel CPUs.
  */
 
-//#include <libxfs.h>
-#include <xfs/platform_defs.h>
-#include <xfs/swab.h>
-#include <xfs/xfs_arch.h>
+#include "xfs/platform_defs.h"
+#include "xfs/swab.h"
+#include "xfs/xfs_arch.h"
 #include "crc32defs.h"
 
 /* types specifc to this file */

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs

#7 lore raw
Quoted 5 lines · Dave Chinner

Actually, I think that platform_defs.h needs to be symlinked into include/xfs. that was the intent, but I bet I missed it because the build wasn't failing and so I didn't notice that I'd failed to put it into the the include/Makefile rule for installed headers.

Quoted 8 lines

Yeah, there we are - the install-dev rule has a specific install rule for platform_defs.h as well, so it was being included in the package builds correctly (i.e. installed in /usr/include/xfs) without being mentioned in the HFILES definition that defines header files to be packaged for /usr/include/xfs....

Patch below (which uncovers another issue to do with include files on the distclean side, but is not fatal and I'll fix tomorrow).

This works fine for me.

Btw, we really shouldn't be installing generated files, that's a major PITA for multiarch setups. I'll see how much of the autoconf magic we even need here.

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs

#8 lore raw
Quoted 12 lines · Christoph Hellwig
Quoted 11 lines · Dave Chinner

Actually, I think that platform_defs.h needs to be symlinked into include/xfs. that was the intent, but I bet I missed it because the build wasn't failing and so I didn't notice that I'd failed to put it into the the include/Makefile rule for installed headers.

Yeah, there we are - the install-dev rule has a specific install rule for platform_defs.h as well, so it was being included in the package builds correctly (i.e. installed in /usr/include/xfs) without being mentioned in the HFILES definition that defines header files to be packaged for /usr/include/xfs....

Quoted 8 lines
Quoted 2 lines

Patch below (which uncovers another issue to do with include files on the distclean side, but is not fatal and I'll fix tomorrow).

This works fine for me.

Btw, we really shouldn't be installing generated files, that's a major PITA for multiarch setups. I'll see how much of the autoconf magic we even need here.

FWIW, we do a crazy thing in RPM land ...

# cat /usr/include/xfs/platform_defs.h 
/* This file is here to prevent a file conflict on multiarch systems. A
 * conflict will occur because platform_defs.h has arch-specific definitions.
 *
 * DO NOT INCLUDE THE NEW FILE DIRECTLY -- ALWAYS INCLUDE THIS ONE INSTEAD. */

#if defined(__i386__)
#include "platform_defs-i386.h"
#elif defined(__x86_64__)
#include "platform_defs-x86_64.h"
#elif defined(__powerpc64__)
#include "platform_defs-ppc64.h"
... etc ...

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs

#9 lore raw

FYI, here is a WIP patch that makes platform_defs.h a properly installable regular header and instead has a local generated config.h. Still needs more than build testing and proper documentation, though.

.gitignore +1 -1
index 913b371..90d9ffa 100644
@@ -6,7 +6,7 @@
 # build system
 .census
 .gitcensus
-/include/platform_defs.h
+/include/config.h
 /include/builddefs
 /install-sh
 
Makefile +5 -5
index d04f853..d50710f 100644
@@ -33,7 +33,7 @@ SRCTARINC = m4/libtool.m4 m4/lt~obsolete.m4 m4/ltoptions.m4 m4/ltsugar.m4 \
            m4/ltversion.m4 po/xfsprogs.pot .gitcensus $(CONFIGURE)
 LDIRT = config.log .ltdep .dep config.status config.cache confdefs.h \
 	conftest* built .census install.* install-dev.* *.gz \
-	autom4te.cache/* libtool include/builddefs include/platform_defs.h
+	autom4te.cache/* libtool include/builddefs include/config.h
 
 ifeq ($(HAVE_BUILDDEFS), yes)
 LDIRDIRT = $(SRCDIR)
@@ -48,7 +48,7 @@ TOOL_SUBDIRS = copy db estimate fsck fsr growfs io logprint mkfs quota \
 
 SUBDIRS = include $(LIB_SUBDIRS) $(TOOL_SUBDIRS)
 
-default: include/builddefs include/platform_defs.h
+default: include/builddefs include/config.h
 ifeq ($(HAVE_BUILDDEFS), no)
 	$(Q)$(MAKE) $(MAKEOPTS) -C . $@
 else
@@ -91,7 +91,7 @@ configure:
 include/builddefs: configure
 	./configure $$LOCAL_CONFIGURE_OPTIONS
 
-include/platform_defs.h: include/builddefs
+include/config.h: include/builddefs
 ## Recover from the removal of $@
 	@if test -f $@; then :; else \
 		rm -f include/builddefs; \
@@ -127,14 +127,14 @@ realclean: distclean
 #
 # All this gunk is to allow for a make dist on an unconfigured tree
 #
-dist: include/builddefs include/platform_defs.h default
+dist: include/builddefs include/config.h default
 ifeq ($(HAVE_BUILDDEFS), no)
 	$(Q)$(MAKE) $(MAKEOPTS) -C . $@
 else
 	$(Q)$(MAKE) $(MAKEOPTS) $(SRCTAR)
 endif
 
-deb: include/builddefs include/platform_defs.h
+deb: include/builddefs include/config.h
 ifeq ($(HAVE_BUILDDEFS), no)
 	$(Q)$(MAKE) $(MAKEOPTS) -C . $@
 else
configure.ac +1 -1
index ae17c68..8d8418a 100644
@@ -3,7 +3,7 @@ AC_PREREQ(2.50)
 AC_CONFIG_AUX_DIR([.])
 AC_CONFIG_MACRO_DIR([m4])
 AC_CONFIG_SRCDIR([include/libxfs.h])
-AC_CONFIG_HEADER(include/platform_defs.h)
+AC_CONFIG_HEADER(include/config.h)
 AC_PREFIX_DEFAULT(/usr)
 
 AC_PROG_LIBTOOL
copy/xfs_copy.c +1 -0
index 279527c..d5865da 100644
@@ -16,6 +16,7 @@
  * Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
+#include <config.h>
 #include <xfs/libxfs.h>
 #include <sys/stat.h>
 #include <sys/wait.h>
db/addr.c +1 -0
index 9bea1c7..be57a44 100644
@@ -16,6 +16,7 @@
  * Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
+#include <config.h>
 #include <xfs/libxfs.h>
 #include "addr.h"
 #include "command.h"
db/agf.c +1 -0
index d9a07ca..5392702 100644
@@ -16,6 +16,7 @@
  * Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
+#include <config.h>
 #include <xfs/libxfs.h>
 #include "command.h"
 #include "type.h"
db/agfl.c +1 -0
index b29538f..a66c4ca 100644
@@ -16,6 +16,7 @@
  * Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
+#include <config.h>
 #include <xfs/libxfs.h>
 #include "command.h"
 #include "type.h"
db/agi.c +1 -0
index 6f167ac..352ca0a 100644
@@ -16,6 +16,7 @@
  * Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
+#include <config.h>
 #include <xfs/libxfs.h>
 #include "command.h"
 #include "type.h"
db/attr.c +1 -0
index 41c0db0..5194486 100644
@@ -16,6 +16,7 @@
  * Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
+#include <config.h>
 #include <xfs/libxfs.h>
 #include "bit.h"
 #include "type.h"
db/attrset.c +1 -0
index ea5261a..b4e0e50 100644
@@ -16,6 +16,7 @@
  * Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
+#include <config.h>
 #include <xfs/libxfs.h>
 #include "command.h"
 #include "attrset.h"
db/attrshort.c +1 -0
index 72f73dd..c3e3af3 100644
@@ -16,6 +16,7 @@
  * Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
+#include <config.h>
 #include <xfs/libxfs.h>
 #include "type.h"
 #include "faddr.h"
db/bit.c +1 -0
index e8adab3..5c468a9 100644
@@ -16,6 +16,7 @@
  * Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
+#include <config.h>
 #include <xfs/libxfs.h>
 #include "bit.h"
 
db/block.c +1 -0
index 59a6265..5cc8ebc 100644
@@ -16,6 +16,7 @@
  * Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
+#include <config.h>
 #include <xfs/libxfs.h>
 #include "block.h"
 #include "bmap.h"
db/bmap.c +1 -0
index 2a49380..f857cb5 100644
@@ -16,6 +16,7 @@
  * Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
+#include <config.h>
 #include <xfs/libxfs.h>
 #include "command.h"
 #include "type.h"
db/bmroot.c +1 -0
index e2194aa..2ac6861 100644
@@ -16,6 +16,7 @@
  * Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
+#include <config.h>
 #include <xfs/libxfs.h>
 #include "type.h"
 #include "faddr.h"
db/btblock.c +1 -0
index 982b52b..cca8747 100644
@@ -16,6 +16,7 @@
  * Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
+#include <config.h>
 #include <xfs/libxfs.h>
 #include "type.h"
 #include "faddr.h"
db/check.c +1 -0
index 1822905..c17a62a 100644
@@ -16,6 +16,7 @@
  * Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
+#include <config.h>
 #include <xfs/libxfs.h>
 #include <math.h>
 #include <sys/time.h>
db/command.c +1 -0
index b7e3165..73c218b 100644
@@ -16,6 +16,7 @@
  * Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
+#include <config.h>
 #include <xfs/libxfs.h>
 #include "addr.h"
 #include "attrset.h"
db/convert.c +1 -0
index de4bfbf..80d35b8 100644
@@ -16,6 +16,7 @@
  * Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
+#include <config.h>
 #include <xfs/libxfs.h>
 #include "command.h"
 #include "convert.h"
db/debug.c +1 -0
index 07a2482..605ae22 100644
@@ -16,6 +16,7 @@
  * Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
+#include <config.h>
 #include <xfs/libxfs.h>
 #include "command.h"
 #include "debug.h"
db/dir2.c +1 -0
index 18a54b6..68fd79e 100644
@@ -16,6 +16,7 @@
  * Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
+#include <config.h>
 #include <xfs/libxfs.h>
 #include "bit.h"
 #include "type.h"
db/dir2sf.c +1 -0
index bbe6080..f23a296 100644
@@ -16,6 +16,7 @@
  * Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
+#include <config.h>
 #include <xfs/libxfs.h>
 #include "type.h"
 #include "faddr.h"
db/dquot.c +1 -0
index 2f7d463..fe91144 100644
@@ -16,6 +16,7 @@
  * Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
+#include <config.h>
 #include <xfs/libxfs.h>
 #include "bit.h"
 #include "bmap.h"
db/echo.c +1 -0
index 813187b..db2f9a5 100644
@@ -16,6 +16,7 @@
  * Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
+#include <config.h>
 #include <xfs/libxfs.h>
 #include "command.h"
 #include "echo.h"
db/faddr.c +1 -0
index d40717d..5898710 100644
@@ -16,6 +16,7 @@
  * Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
+#include <config.h>
 #include <xfs/libxfs.h>
 #include "type.h"
 #include "fprint.h"
db/field.c +1 -0
index 52d9d9b..ae68fcc 100644
@@ -16,6 +16,7 @@
  * Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
+#include <config.h>
 #include <xfs/libxfs.h>
 #include "type.h"
 #include "faddr.h"
db/flist.c +1 -0
index 33f7da7..7d9684f 100644
@@ -16,6 +16,7 @@
  * Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
+#include <config.h>
 #include <xfs/libxfs.h>
 #include "type.h"
 #include "faddr.h"
db/fprint.c +1 -0
index 52782e2..ad7b696 100644
@@ -16,6 +16,7 @@
  * Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
+#include <config.h>
 #include <xfs/libxfs.h>
 #include <ctype.h>
 #include <time.h>
db/frag.c +1 -0
index d8ad25e..acafe7d 100644
@@ -16,6 +16,7 @@
  * Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
+#include <config.h>
 #include <xfs/libxfs.h>
 #include <sys/time.h>
 #include "bmap.h"
db/freesp.c +1 -0
index 361fa96..ea210dc 100644
@@ -16,6 +16,7 @@
  * Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
+#include <config.h>
 #include <xfs/libxfs.h>
 #include "command.h"
 #include "freesp.h"
db/hash.c +1 -0
index 02376e6..25a6437 100644
@@ -16,6 +16,7 @@
  * Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
+#include <config.h>
 #include <xfs/libxfs.h>
 #include "addr.h"
 #include "command.h"
db/help.c +1 -0
index 7913100..8a650b5 100644
@@ -16,6 +16,7 @@
  * Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
+#include <config.h>
 #include <xfs/libxfs.h>
 #include "command.h"
 #include "help.h"
db/init.c +1 -0
index f93ab15..5c5ca5b 100644
@@ -16,6 +16,7 @@
  * Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
+#include <config.h>
 #include <xfs/libxfs.h>
 #include <signal.h>
 #include "command.h"
db/inode.c +1 -0
index fbae0bd..3714dc9 100644
@@ -16,6 +16,7 @@
  * Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
+#include <config.h>
 #include <xfs/libxfs.h>
 #include "command.h"
 #include "type.h"
db/input.c +1 -0
index b73a1f8..ba07007 100644
@@ -16,6 +16,7 @@
  * Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
+#include <config.h>
 #include <xfs/libxfs.h>
 #include <signal.h>
 #include "command.h"
db/io.c +1 -0
index b55a5fb..5f6bd9d 100644
@@ -16,6 +16,7 @@
  * Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
+#include <config.h>
 #include <xfs/libxfs.h>
 #include "command.h"
 #include "type.h"
db/malloc.c +1 -0
index fe1eacf..5d8e2b1 100644
@@ -16,6 +16,7 @@
  * Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
+#include <config.h>
 #include <xfs/libxfs.h>
 #include "init.h"
 #include "malloc.h"
db/metadump.c +1 -0
index cca9b49..282b46a 100644
@@ -16,6 +16,7 @@
  * Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
+#include <config.h>
 #include <libxfs.h>
 #include <libxlog.h>
 #include "bmap.h"
db/output.c +1 -0
index 36669f4..270d6ed 100644
@@ -16,6 +16,7 @@
  * Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
+#include <config.h>
 #include <xfs/libxfs.h>
 #include <stdarg.h>
 #include "command.h"
db/print.c +1 -0
index b865d64..8a9c752 100644
@@ -16,6 +16,7 @@
  * Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
+#include <config.h>
 #include <xfs/libxfs.h>
 #include "command.h"
 #include "type.h"
db/quit.c +1 -0
index 5e4413c..9f395d5 100644
@@ -16,6 +16,7 @@
  * Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
+#include <config.h>
 #include <xfs/libxfs.h>
 #include "command.h"
 #include "quit.h"
db/sb.c +1 -0
index b6c0c4e..cafe5a5 100644
@@ -16,6 +16,7 @@
  * Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
+#include <config.h>
 #include <xfs/libxfs.h>
 #include <xfs/libxlog.h>
 #include "command.h"
db/sig.c +1 -0
index 338c706..4bd10fd 100644
@@ -16,6 +16,7 @@
  * Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
+#include <config.h>
 #include <xfs/libxfs.h>
 #include <signal.h>
 #include "sig.h"
db/strvec.c +1 -0
index 8aa4e34..5d55ac6 100644
@@ -16,6 +16,7 @@
  * Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
+#include <config.h>
 #include <xfs/libxfs.h>
 #include "strvec.h"
 #include "output.h"
db/symlink.c +1 -0
index a4f420f..6ad8d24 100644
@@ -16,6 +16,7 @@
  * Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
+#include <config.h>
 #include <xfs/libxfs.h>
 #include "type.h"
 #include "faddr.h"
db/text.c +1 -0
index 12084a2..d7e5894 100644
@@ -16,6 +16,7 @@
  * Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
+#include <config.h>
 #include <xfs/libxfs.h>
 #include <ctype.h>
 #include "block.h"
db/type.c +1 -0
index 28535de..a561160 100644
@@ -16,6 +16,7 @@
  * Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
+#include <config.h>
 #include <xfs/libxfs.h>
 #include "block.h"
 #include "command.h"
db/write.c +1 -0
index 655b618..954529b 100644
@@ -16,6 +16,7 @@
  * Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
+#include <config.h>
 #include <xfs/libxfs.h>
 #include <ctype.h>
 #include <time.h>
debian/rules +2 -2
index 2be2773..9718d49 100755
@@ -36,14 +36,14 @@ config: .census
 	@echo "== dpkg-buildpackage: configure" 1>&2
 	$(checkdir)
 	AUTOHEADER=/bin/true dh_autoreconf
-	$(options) $(MAKE) include/platform_defs.h
+	$(options) $(MAKE) include/config.h
 	touch .census
 
 dibuild:
 	$(checkdir)
 	@echo "== dpkg-buildpackage: installer" 1>&2
 	if [ ! -f mkfs/mkfs.xfs-$(bootpkg) ]; then \
-		$(diopts) $(MAKE) include/platform_defs.h; \
+		$(diopts) $(MAKE) include/config.h; \
 		for dir in include libxfs libdisk mkfs; do \
 			$(MAKE) -C $$dir; \
 		done; \
estimate/xfs_estimate.c +1 -0
index c574a08..6fcc8d8 100644
@@ -21,6 +21,7 @@
  *
  * XXX: assumes dirv1 format.
  */
+#include <config.h>
 #include <xfs/libxfs.h>
 #include <sys/stat.h>
 #include <ftw.h>
fsr/xfs_fsr.c +1 -0
index 2fc94c7..9cb0b4a 100644
@@ -16,6 +16,7 @@
  * Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
+#include <config.h>
 #include <libxfs.h>
 #include <xfs/xfs.h>
 #include <xfs/xfs_types.h>
growfs/xfs_growfs.c +1 -0
index 4a344fe..9730d31 100644
@@ -16,6 +16,7 @@
  * Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
+#include <config.h>
 #include <xfs/libxfs.h>
 #include <xfs/path.h>
 
include/Makefile +2 -3
index 70e43a0..688fe5e 100644
@@ -30,13 +30,13 @@ QAHFILES = libxfs.h libxlog.h \
 	xfs_trace.h \
 	xfs_trans.h
 
-HFILES = handle.h jdm.h xqm.h xfs.h
+HFILES = handle.h jdm.h xqm.h xfs.h platform_defs.h
 HFILES += $(PKG_PLATFORM).h
 PHFILES = darwin.h freebsd.h irix.h linux.h gnukfreebsd.h
 DKHFILES = volume.h fstyp.h dvh.h
 LIBHFILES = command.h input.h path.h project.h
 LSRCFILES = $(shell echo $(PHFILES) | sed -e "s/$(PKG_PLATFORM).h//g")
-LSRCFILES += platform_defs.h.in builddefs.in buildmacros buildrules install-sh
+LSRCFILES += config.h.in builddefs.in buildmacros buildrules install-sh
 LSRCFILES += $(DKHFILES) $(LIBHFILES)
 LDIRT = disk
 LDIRDIRT = xfs
@@ -62,7 +62,6 @@ include $(BUILDRULES)
 install-dev: default
 	$(INSTALL) -m 755 -d $(PKG_INC_DIR)
 	$(INSTALL) -m 644 $(HFILES) $(PKG_INC_DIR)
-	$(INSTALL) -m 644 platform_defs.h $(PKG_INC_DIR)
 
 install-qa: install-dev
 	$(INSTALL) -m 644 $(QAHFILES) $(PKG_INC_DIR)
include/config.h.in new file +85 -0

85 lines not on this page · raw message

include/darwin.h +9 -0
index 95f865b..dda1111 100644
@@ -109,6 +109,15 @@ static __inline__ void platform_uuid_copy(uuid_t *dst, uuid_t *src)
 	memcpy(dst, src, sizeof(uuid_t));
 }
 
+typedef unsigned char		__u8;
+typedef signed char		__s8;
+typedef unsigned short		__u16;
+typedef signed short		__s16;
+typedef unsigned int		__u32;
+typedef signed int		__s32;
+typedef unsigned long long int	__u64;
+typedef signed long long int	__s64;
+
 #define __int8_t	int8_t
 #define __int16_t	int16_t
 #define __int32_t	int32_t
include/freebsd.h +9 -0
index b51688b..3973618 100644
@@ -55,6 +55,15 @@ typedef __int64_t	xfs_daddr_t;
 typedef char*		xfs_caddr_t;
 typedef off_t		loff_t;
 
+typedef unsigned char		__u8;
+typedef signed char		__s8;
+typedef unsigned short		__u16;
+typedef signed short		__s16;
+typedef unsigned int		__u32;
+typedef signed int		__s32;
+typedef unsigned long long int	__u64;
+typedef signed long long int	__s64;
+
 #ifndef	_UCHAR_T_DEFINED
 typedef unsigned char	uchar_t;
 #define	_UCHAR_T_DEFINED	1
include/gnukfreebsd.h +9 -0
index 2140acd..0ac8105 100644
@@ -45,6 +45,15 @@ typedef __int64_t	xfs_daddr_t;
 typedef char*		xfs_caddr_t;
 typedef off_t		loff_t;
 
+typedef unsigned char		__u8;
+typedef signed char		__s8;
+typedef unsigned short		__u16;
+typedef signed short		__s16;
+typedef unsigned int		__u32;
+typedef signed int		__s32;
+typedef unsigned long long int	__u64;
+typedef signed long long int	__s64;
+
 #ifndef	_UCHAR_T_DEFINED
 typedef unsigned char	uchar_t;
 #define	_UCHAR_T_DEFINED	1
include/irix.h +9 -0
index 5040451..68fb054 100644
@@ -49,6 +49,15 @@ typedef __int32_t	xfs_dev_t;
 typedef __int64_t	xfs_daddr_t;
 typedef char*		xfs_caddr_t;
 
+typedef unsigned char		__u8;
+typedef signed char		__s8;
+typedef unsigned short		__u16;
+typedef signed short		__s16;
+typedef unsigned int		__u32;
+typedef signed int		__s32;
+typedef unsigned long long int	__u64;
+typedef signed long long int	__s64;
+
 #define xfs_flock64	flock64
 #define xfs_flock64_t	struct flock64
 
include/linux.h +1 -0
index 5586290..91d1161 100644
@@ -17,6 +17,7 @@
 #ifndef __XFS_LINUX_H__
 #define __XFS_LINUX_H__
 
+#include <asm/types.h>
 #include <uuid/uuid.h>
 #include <sys/vfs.h>
 #include <sys/ioctl.h>
include/platform_defs.h new file +107 -0

107 lines not on this page · raw message

include/platform_defs.h.in deleted +0 -181

181 lines not on this page · raw message

io/attr.c +1 -0
index 9b26f31..df9f4ab 100644
@@ -16,6 +16,7 @@
  * Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
+#include <config.h>
 #include <xfs/xfs.h>
 #include <xfs/command.h>
 #include <xfs/input.h>
io/bmap.c +1 -0
index a78cbb1..a76506e 100644
@@ -16,6 +16,7 @@
  * Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
+#include <config.h>
 #include <xfs/xfs.h>
 #include <xfs/command.h>
 #include "init.h"
io/fadvise.c +1 -0
index a27b8f7..ba982e4 100644
@@ -16,6 +16,7 @@
  * Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
+#include <config.h>
 #include <xfs/xfs.h>
 #include <xfs/command.h>
 #include <xfs/input.h>
io/fiemap.c +1 -0
index e76be97..2448ce6 100644
@@ -16,6 +16,7 @@
  * Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
+#include <config.h>
 #include <xfs/xfs.h>
 #include <xfs/command.h>
 #include <linux/fiemap.h>
io/file.c +1 -0
index 73b893f..b5fca5f 100644
@@ -16,6 +16,7 @@
  * Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
+#include <config.h>
 #include <xfs/xfs.h>
 #include <xfs/command.h>
 #include <xfs/input.h>
io/freeze.c +1 -0
index 89cd303..d981cde 100644
@@ -16,6 +16,7 @@
  * Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
+#include <config.h>
 #include <xfs/xfs.h>
 #include <xfs/command.h>
 #include <xfs/input.h>
io/fsync.c +1 -0
index 5ed8d25..63d8db8 100644
@@ -16,6 +16,7 @@
  * Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
+#include <config.h>
 #include <xfs/xfs.h>
 #include <xfs/command.h>
 #include "init.h"
io/getrusage.c +1 -0
index 32f2a7e..80723a3 100644
@@ -16,6 +16,7 @@
  * Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
+#include <config.h>
 #include <xfs/xfs.h>
 #include <xfs/command.h>
 #include <xfs/input.h>
io/imap.c +1 -0
index 4f3f883..b99e1bc 100644
@@ -16,6 +16,7 @@
  * Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
+#include <config.h>
 #include <xfs/xfs.h>
 #include <xfs/command.h>
 #include <xfs/input.h>
io/init.c +1 -0
index 1b07518..8aa38b7 100644
@@ -16,6 +16,7 @@
  * Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
+#include <config.h>
 #include <xfs/xfs.h>
 #include <xfs/command.h>
 #include <xfs/input.h>
io/inject.c +1 -0
index 1e078ae..a4fa6c7 100644
@@ -16,6 +16,7 @@
  * Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
+#include <config.h>
 #include <xfs/xfs.h>
 #include <xfs/command.h>
 #include <xfs/input.h>
io/link.c +1 -0
index 9c2d1f8..bb81a7c 100644
@@ -16,6 +16,7 @@
  * Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
+#include <config.h>
 #include <xfs/xfs.h>
 #include <xfs/command.h>
 #include <xfs/input.h>
io/madvise.c +1 -0
index 87f619d..4427188 100644
@@ -16,6 +16,7 @@
  * Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
+#include <config.h>
 #include <xfs/xfs.h>
 #include <xfs/command.h>
 #include <xfs/input.h>
io/mincore.c +1 -0
index eac8699..fb27987 100644
@@ -16,6 +16,7 @@
  * Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
+#include <config.h>
 #include <xfs/xfs.h>
 #include <xfs/command.h>
 #include <xfs/input.h>
io/mmap.c +1 -0
index 565a541..b2fde0f 100644
@@ -16,6 +16,7 @@
  * Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
+#include <config.h>
 #include <xfs/xfs.h>
 #include <xfs/command.h>
 #include <xfs/input.h>
io/open.c +1 -0
index c106fa7..7d027fe 100644
@@ -16,6 +16,7 @@
  * Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
+#include <config.h>
 #include <xfs/xfs.h>
 #include <xfs/command.h>
 #include <xfs/input.h>
io/parent.c +1 -0
index 0313119..f88ccfd 100644
@@ -16,6 +16,7 @@
  * Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
+#include <config.h>
 #include <xfs/xfs.h>
 #include <xfs/command.h>
 #include <xfs/input.h>
io/pread.c +1 -0
index cff3275..b04c924 100644
@@ -16,6 +16,7 @@
  * Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
+#include <config.h>
 #include <sys/uio.h>
 #include <xfs/xfs.h>
 #include <xfs/command.h>
io/prealloc.c +1 -0
index 4ab3d8c..38b8a79 100644
@@ -16,6 +16,7 @@
  * Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
+#include <config.h>
 #if defined(HAVE_FALLOCATE)
 #include <linux/falloc.h>
 #endif
io/pwrite.c +1 -0
index 0674c01..5444b2c 100644
@@ -16,6 +16,7 @@
  * Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
+#include <config.h>
 #include <sys/uio.h>
 #include <xfs/xfs.h>
 #include <xfs/command.h>
io/readdir.c +1 -0
index 7133204..f34a914 100644
@@ -16,6 +16,7 @@
  * Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
+#include <config.h>
 #include <xfs/xfs.h>
 #include <xfs/command.h>
 #include <xfs/input.h>
io/resblks.c +1 -0
index 2e54776..9baeb8c 100644
@@ -16,6 +16,7 @@
  * Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
+#include <config.h>
 #include <xfs/xfs.h>
 #include <xfs/command.h>
 #include <xfs/input.h>
io/seek.c +1 -0
index 526b7b8..86e91e8 100644
@@ -16,6 +16,7 @@
  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
+#include <config.h>
 #include <xfs/xfs.h>
 #include <xfs/command.h>
 #include <xfs/input.h>
io/sendfile.c +1 -0
index 426b75d..c904e1c 100644
@@ -16,6 +16,7 @@
  * Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
+#include <config.h>
 #include <xfs/xfs.h>
 #include <xfs/command.h>
 #include <xfs/input.h>
io/shutdown.c +1 -0
index 21e1626..2d01c3d 100644
@@ -16,6 +16,7 @@
  * Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
+#include <config.h>
 #include <xfs/xfs.h>
 #include <xfs/command.h>
 #include <xfs/input.h>
io/sync.c +1 -0
index 683899b..dd4e5dd 100644
@@ -16,6 +16,7 @@
  * Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
+#include <config.h>
 #include <xfs/xfs.h>
 #include <xfs/command.h>
 #include "init.h"
io/sync_file_range.c +1 -0
index 35d8cc5..f4a7a57 100644
@@ -16,6 +16,7 @@
  * Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
+#include <config.h>
 #include <xfs/xfs.h>
 #include <xfs/command.h>
 #include <xfs/input.h>
io/truncate.c +1 -0
index 49ced6f..d63d6a1 100644
@@ -16,6 +16,7 @@
  * Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
+#include <config.h>
 #include <xfs/xfs.h>
 #include <xfs/command.h>
 #include <xfs/input.h>
libxcmd/command.c +1 -0
index ebf1413..708c3fc 100644
@@ -16,6 +16,7 @@
  * Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
+#include <config.h>
 #include <xfs/xfs.h>
 #include <xfs/command.h>
 #include <xfs/input.h>
libxcmd/help.c +1 -0
index 54d34d8..3761a56 100644
@@ -16,6 +16,7 @@
  * Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
+#include <config.h>
 #include <xfs/xfs.h>
 #include <xfs/command.h>
 
libxcmd/input.c +1 -0
index c06b5b8..d8f637f 100644
@@ -16,6 +16,7 @@
  * Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
+#include <config.h>
 #include <xfs/xfs.h>
 #include <xfs/input.h>
 #include <ctype.h>
libxcmd/paths.c +1 -0
index 443adbb..2ce07f5 100644
@@ -16,6 +16,7 @@
  * Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
+#include <config.h>
 #include <paths.h>
 #include <errno.h>
 #include <stdio.h>
libxcmd/projects.c +1 -0
index a0f5bc9..34125fd 100644
@@ -16,6 +16,7 @@
  * Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
+#include <config.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
libxcmd/quit.c +1 -0
index faba4d1..6d9b5b7 100644
@@ -16,6 +16,7 @@
  * Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
+#include <config.h>
 #include <xfs/xfs.h>
 #include <xfs/command.h>
 
libxfs/libxfs_priv.h +1 -0
index 72fc4b3..7483797 100644
@@ -59,6 +59,7 @@
 
 #include "libxfs_api_defs.h"
 #include <xfs/platform_defs.h>
+#include <config.h>
 
 #include <xfs/list.h>
 #include <xfs/hlist.h>
libxfs/radix-tree.c +1 -0
index c4b6971..8160f23 100644
@@ -19,6 +19,7 @@
  */
 
 #include <xfs/platform_defs.h>
+#include <config.h>
 #include "radix-tree.h"
 
 #ifndef ARRAY_SIZE
libxlog/util.c +1 -0
index 498c06c..01e97bb 100644
@@ -16,6 +16,7 @@
  * Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
+#include <config.h>
 #include <xfs/libxfs.h>
 #include <xfs/libxlog.h>
 
logprint/log_copy.c +1 -0
index 1517846..74063a8 100644
@@ -15,6 +15,7 @@
  * along with this program; if not, write the Free Software Foundation,
  * Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
+#include <config.h>
 #include <xfs/libxfs.h>
 #include <xfs/libxlog.h>
 
logprint/log_dump.c +1 -0
index dcecb44..4a50bae 100644
@@ -15,6 +15,7 @@
  * along with this program; if not, write the Free Software Foundation,
  * Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
+#include <config.h>
 #include <xfs/libxfs.h>
 #include <xfs/libxlog.h>
 
logprint/log_misc.c +1 -0
index 521ab66..7e49d50 100644
@@ -15,6 +15,7 @@
  * along with this program; if not, write the Free Software Foundation,
  * Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
+#include <config.h>
 #include <xfs/libxfs.h>
 #include <xfs/libxlog.h>
 
logprint/log_print_all.c +1 -0
index a02c71a..253017a 100644
@@ -15,6 +15,7 @@
  * along with this program; if not, write the Free Software Foundation,
  * Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
+#include <config.h>
 #include <xfs/libxfs.h>
 #include <xfs/libxlog.h>
 
logprint/log_print_trans.c +1 -0
index 0911b6f..22acc96 100644
@@ -15,6 +15,7 @@
  * along with this program; if not, write the Free Software Foundation,
  * Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
+#include <config.h>
 #include <xfs/libxfs.h>
 #include <xfs/libxlog.h>
 
logprint/logprint.c +1 -0
index fdf106b..52a203c 100644
@@ -18,6 +18,7 @@
 #include <sys/types.h>
 #include <sys/stat.h>
 
+#include <config.h>
 #include <xfs/libxfs.h>
 #include <xfs/libxlog.h>
 
mkfs/proto.c +1 -0
index 45565b7..11efb70 100644
@@ -16,6 +16,7 @@
  * Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
+#include <config.h>
 #include <xfs/libxfs.h>
 #include <sys/stat.h>
 #include "xfs_mkfs.h"
mkfs/xfs_mkfs.c +1 -0
index 83f7749..47c8d7b 100644
@@ -16,6 +16,7 @@
  * Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
+#include <config.h>
 #include <xfs/libxfs.h>
 #include <ctype.h>
 #ifdef ENABLE_BLKID
quota/darwin.c +1 -0
index fb81f7f..7024eb8 100644
@@ -16,6 +16,7 @@
  * Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
+#include <config.h>
 #include "quota.h"
 #include <sys/quota.h>
 
quota/edit.c +1 -0
index cad3aee..57d517b 100644
@@ -16,6 +16,7 @@
  * Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
+#include <config.h>
 #include <pwd.h>
 #include <grp.h>
 #include <ctype.h>
quota/free.c +1 -0
index 79b52e9..e37e7c9 100644
@@ -16,6 +16,7 @@
  * Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
+#include <config.h>
 #include <xfs/command.h>
 #include "init.h"
 #include "quota.h"
quota/freebsd.c +1 -0
index 7770b3c..0a19f39 100644
@@ -16,6 +16,7 @@
  * Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
+#include <config.h>
 #include "quota.h"
 
 int
quota/init.c +1 -0
index 639e9e7..75840d5 100644
@@ -16,6 +16,7 @@
  * Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
+#include <config.h>
 #include <xfs/path.h>
 #include <xfs/command.h>
 #include <xfs/input.h>
quota/irix.c +1 -0
index bbbcd18..80381b4 100644
@@ -16,6 +16,7 @@
  * Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
+#include <config.h>
 #include "quota.h"
 #include <sys/quota.h>
 
quota/linux.c +1 -0
index 8a73922..86bbfa9 100644
@@ -16,6 +16,7 @@
  * Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
+#include <config.h>
 #include "quota.h"
 #include <sys/quota.h>
 
quota/path.c +1 -0
index 0c204ed..2daf7cc 100644
@@ -16,6 +16,7 @@
  * Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
+#include <config.h>
 #include <xfs/command.h>
 #include <xfs/input.h>
 #include "init.h"
quota/project.c +1 -0
index a2c7046..eb88fb8 100644
@@ -16,6 +16,7 @@
  * Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
+#include <config.h>
 #include <xfs/command.h>
 #include <xfs/input.h>
 #include "init.h"
quota/quot.c +1 -0
index 96d449e..a06d94a 100644
@@ -16,6 +16,7 @@
  * Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
+#include <config.h>
 #include <xfs/command.h>
 #include <ctype.h>
 #include <pwd.h>
quota/quota.c +1 -0
index 367da8c..3c5f751 100644
@@ -16,6 +16,7 @@
  * Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
+#include <config.h>
 #include <xfs/command.h>
 #include <ctype.h>
 #include <pwd.h>
quota/report.c +1 -0
index 8e3316e..88df916 100644
@@ -16,6 +16,7 @@
  * Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
+#include <config.h>
 #include <xfs/command.h>
 #include <sys/types.h>
 #include <pwd.h>
quota/state.c +1 -0
index 42bffc0..be466b7 100644
@@ -16,6 +16,7 @@
  * Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
+#include <config.h>
 #include <xfs/command.h>
 #include "init.h"
 #include "quota.h"
quota/util.c +1 -0
index 179aafd..df3759d 100644
@@ -16,6 +16,7 @@
  * Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
+#include <config.h>
 #include <sys/types.h>
 #include <pwd.h>
 #include <grp.h>
repair/agheader.c +1 -0
index 9ae2deb..59cb630 100644
@@ -16,6 +16,7 @@
  * Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
+#include <config.h>
 #include <libxfs.h>
 #include "globals.h"
 #include "agheader.h"
repair/attr_repair.c +1 -0
index f3332b3..f2f3aca 100644
@@ -16,6 +16,7 @@
  * Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
+#include <config.h>
 #include <libxfs.h>
 #include "globals.h"
 #include "err_protos.h"
repair/avl.c +1 -0
index eabecc3..0e8a2b1 100644
@@ -16,6 +16,7 @@
  * Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
+#include <config.h>
 #include <libxfs.h>
 #include "avl.h"
 
repair/avl64.c +1 -0
index c135da3..da87461 100644
@@ -16,6 +16,7 @@
  * Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
+#include <config.h>
 #include <stdio.h>
 #include <libxfs.h>
 #include "avl64.h"
repair/bmap.c +1 -0
index 71568f4..457c3bd 100644
@@ -16,6 +16,7 @@
  * Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
+#include <config.h>
 #include <libxfs.h>
 #include "err_protos.h"
 #include "bmap.h"
repair/btree.c +1 -0
index 2beb75a..81d166b 100644
@@ -16,6 +16,7 @@
  * Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
+#include <config.h>
 #include <libxfs.h>
 #include "btree.h"
 
repair/dino_chunks.c +1 -0
index 9b7d017..3c3981b 100644
@@ -16,6 +16,7 @@
  * Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
+#include <config.h>
 #include <libxfs.h>
 #include "avl.h"
 #include "globals.h"
repair/dinode.c +1 -0
index 179203e..f1c070d 100644
@@ -16,6 +16,7 @@
  * Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
+#include <config.h>
 #include <libxfs.h>
 #include "avl.h"
 #include "globals.h"
repair/dir2.c +1 -0
index ceb8825..372e7a7 100644
@@ -16,6 +16,7 @@
  * Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
+#include <config.h>
 #include <libxfs.h>
 #include "avl.h"
 #include "globals.h"
repair/globals.c +1 -0
index b588d03..b0747b6 100644
@@ -16,6 +16,7 @@
  * Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
+#include <config.h>
 #include <libxfs.h>
 
 #define EXTERN
repair/incore.c +1 -0
index cf1073f..7534701 100644
@@ -16,6 +16,7 @@
  * Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
+#include <config.h>
 #include <libxfs.h>
 #include "avl.h"
 #include "btree.h"
repair/incore_bmc.c +1 -0
index 1bc5fd9..97c3484 100644
@@ -16,6 +16,7 @@
  * Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
+#include <config.h>
 #include <libxfs.h>
 #include "avl.h"
 #include "globals.h"
repair/incore_ext.c +1 -0
index 826bf44..fd1c515 100644
@@ -16,6 +16,7 @@
  * Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
+#include <config.h>
 #include <libxfs.h>
 #include "avl.h"
 #include "btree.h"
repair/incore_ino.c +1 -0
index cda6c2b..66e32a6 100644
@@ -16,6 +16,7 @@
  * Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
+#include <config.h>
 #include <libxfs.h>
 #include "avl.h"
 #include "globals.h"
repair/init.c +1 -0
index d0940aa..4470bd9 100644
@@ -16,6 +16,7 @@
  * Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
+#include <config.h>
 #include <libxfs.h>
 #include "globals.h"
 #include "agheader.h"
repair/phase1.c +1 -0
index ec75ada..162069a 100644
@@ -16,6 +16,7 @@
  * Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
+#include <config.h>
 #include <libxfs.h>
 #include "globals.h"
 #include "agheader.h"
repair/phase2.c +1 -0
index a23f472..940b3b4 100644
@@ -16,6 +16,7 @@
  * Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
+#include <config.h>
 #include <xfs/libxfs.h>
 #include <xfs/libxlog.h>
 #include "avl.h"
repair/phase3.c +1 -0
index 213d368..370dcb5 100644
@@ -16,6 +16,7 @@
  * Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
+#include <config.h>
 #include <libxfs.h>
 #include "threads.h"
 #include "prefetch.h"
repair/phase4.c +1 -0
index aa79ae0..5ead361 100644
@@ -16,6 +16,7 @@
  * Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
+#include <config.h>
 #include <libxfs.h>
 #include "threads.h"
 #include "prefetch.h"
repair/phase5.c +1 -0
index 0601810..7d61ee1 100644
@@ -16,6 +16,7 @@
  * Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
+#include <config.h>
 #include <libxfs.h>
 #include "avl.h"
 #include "globals.h"
repair/phase6.c +1 -0
index 130ed4f..a55f3dc 100644
@@ -16,6 +16,7 @@
  * Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
+#include <config.h>
 #include <libxfs.h>
 #include "threads.h"
 #include "prefetch.h"
repair/phase7.c +1 -0
index becacf8..49bf014 100644
@@ -16,6 +16,7 @@
  * Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
+#include <config.h>
 #include <libxfs.h>
 #include "avl.h"
 #include "globals.h"
repair/prefetch.c +1 -0
index 1577971..4a0d4df 100644
@@ -1,3 +1,4 @@
+#include <config.h>
 #include <libxfs.h>
 #include <pthread.h>
 #include "avl.h"
repair/progress.c +1 -0
index 45a412e..0125655 100644
@@ -1,4 +1,5 @@
 
+#include <config.h>
 #include <libxfs.h>
 #include "globals.h"
 #include "progress.h"
repair/rt.c +1 -0
index 3a488c8..39e1b7b 100644
@@ -16,6 +16,7 @@
  * Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
+#include <config.h>
 #include <libxfs.h>
 #include "avl.h"
 #include "globals.h"
repair/sb.c +1 -0
index a291b3e..047e385 100644
@@ -16,6 +16,7 @@
  * Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
+#include <config.h>
 #include <libxfs.h>
 #include <libxlog.h>
 #include "agheader.h"
repair/scan.c +1 -0
index e3895c2..5331f51 100644
@@ -16,6 +16,7 @@
  * Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
+#include <config.h>
 #include <libxfs.h>
 #include "avl.h"
 #include "globals.h"
repair/threads.c +1 -0
index d10b841..e5d534f 100644
@@ -1,3 +1,4 @@
+#include <config.h>
 #include <libxfs.h>
 #include <pthread.h>
 #include <signal.h>
repair/versions.c +1 -0
index e176779..8f7e886 100644
@@ -16,6 +16,7 @@
  * Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
+#include <config.h>
 #include <libxfs.h>
 
 #define EXTERN
repair/xfs_repair.c +1 -0
index 11a6069..10d7434 100644
@@ -16,6 +16,7 @@
  * Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
+#include <config.h>
 #include <xfs/libxfs.h>
 #include <xfs/libxlog.h>
 #include <sys/resource.h>
rtcp/xfs_rtcp.c +1 -0
index 5f26a62..887e43f 100644
@@ -16,6 +16,7 @@
  * Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
+#include <config.h>
 #include <libxfs.h>
 
 int rtcp(char *, char *, int);

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs

author Reviewed-by
#10 lore raw
In reply to Dave Chinner
Quoted 28 lines · Dave Chinner
Quoted 16 lines · Christoph Hellwig

Here is the fix. Since that commit the build accidentally relied on the installed platform_defs.h:

---
From e406bcdcdad80ca491d5b854cde5ad893bef6f8c Mon Sep 17 00:00:00 2001
From: Christoph Hellwig <[email protected]>
Date: Wed, 10 Jun 2015 10:34:45 +0200
Subject: xfsprogs: fix platform_defs.h include path
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Since 2fe8a2 ("libxfs: restructure to match kernel layout") platform_defs.h the xfs subdirectory under include/ only contains selected headers instead of being a directory symlink.

Quoted 5 lines

Because of this the build does not properly pick up platform_defs.h, which isn't symlinked into include/xfs. Builds only work if a recent enough platform_defs.h is available under /usr/include/xfs.

Fix this by including platform_defs.h without the xfs/ prefix.

Actually, I think that platform_defs.h needs to be symlinked into include/xfs. that was the intent, but I bet I missed it because the build wasn't failing and so I didn't notice that I'd failed to put it into the the include/Makefile rule for installed headers.

Quoted 8 lines

Yeah, there we are - the install-dev rule has a specific install rule for platform_defs.h as well, so it was being included in the package builds correctly (i.e. installed in /usr/include/xfs) without being mentioned in the HFILES definition that defines header files to be packaged for /usr/include/xfs....

Patch below (which uncovers another issue to do with include files on the distclean side, but is not fatal and I'll fix tomorrow).

Can you apply this one to get the build back working? I have another large one to deal with splitting the generated files on top of it.

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs

#11 lore raw
In reply to Dave Chinner
Quoted 6 lines · Dave Chinner
Quoted 5 lines · Christoph Hellwig
Quoted 1 line · Dave Chinner

Does the problem go away after a 'make distclean'?

No. Neither a distclean nor a fresh clone fixes the issue.

Quoted 8 lines
Quoted 4 lines

Also disabling the crc32ctest target I get similar error in other code.

Note that the master branch is doing fine.

Yeah, it's to do with the libxfs restructure in the for-next branch to ring it up to the same as the 4.1 kernel. Can you dump the output of 'ls -l include/xfs' and attach your include/platform_defs.h file?

Looking at my tree, I suspect it is a missing link from include/xfs/platform_defs.h -> include/platform_defs.h.

I don't have that link in my tree, and so it's pulling /usr/include/xfs/platform_defs.h into the build and hence not failing on my build machine. Not sure where it's getting that include rule from yet...

Cheers,

Dave.

Signature · 7 lines
Dave Chinner
[email protected]

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs