]> www.infradead.org Git - users/hch/xfsprogs.git/commit
Fix building xfsprogs on 32-bit platforms
authorEric Biggers <ebiggers@google.com>
Thu, 22 Dec 2016 15:31:29 +0000 (09:31 -0600)
committerEric Sandeen <sandeen@redhat.com>
Thu, 22 Dec 2016 15:31:29 +0000 (09:31 -0600)
commit5c0599b721d1d232d2e400f357abdf2736f24a97
tree97061ba17f1b28f4266658a2540ee0e64dc17972
parentc89be81f59eff914f8c6331e4928d3d38c6e6571
Fix building xfsprogs on 32-bit platforms

xfslibs now requires that its users enable transparent largefile
support.  This broke building xfsprogs on 32-bit Linux (with glibc)
because _FILE_OFFSET_BITS=64 was not getting defined.  Although the
autoconf macro AC_SYS_LARGEFILE was intended to define it, this didn't
work because AC_SYS_LARGEFILE will only define _FILE_OFFSET_BITS in a
config header, which doesn't work for xfsprogs because not all .c files
include platform_defs.h as their first include.  Also,
platform_defs.h.in is not generated by autoheader and didn't contain a
template for _FILE_OFFSET_BITS.

Therefore, to fix the problem remove the useless autoconf macros and
instead add -D_FILE_OFFSET_BITS=64 to CFLAGS in builddefs.in.  Use
CFLAGS rather than PCFLAGS because this definition could be needed by
platforms other than "linux", and it doesn't hurt to always define it.

Signed-off-by: Eric Biggers <ebiggers@google.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Felix Janda <felix.janda@posteo.de>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
configure.ac
include/builddefs.in
m4/package_libcdev.m4