]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Use getconf LFS_{CFLAGS,LDFLAGS,LIBS} to get flags to compile lib/dns/gen
authorOndřej Surý <ondrej@sury.org>
Mon, 27 May 2019 14:11:11 +0000 (16:11 +0200)
committerOndřej Surý <ondrej@sury.org>
Wed, 29 May 2019 08:31:03 +0000 (10:31 +0200)
On some systems (namely Debian buster armhf) the readdir() call fails
with `Value too large for defined data type` unless the
_FILE_OFFSET_BITS=64 is defined.  The correct way to fix this is to
get the appropriate compilation parameters from getconf system
interface.

(cherry picked from commit 4c7345bcb6646f3690cc33154d43fcd9ebceed69)

lib/dns/Makefile.in

index 56dd259e19b15e7f4866cb53126b1a2df49ac6b1..769d7ff87b1e5d4a9d26f3ad65beca8aa626d6dd 100644 (file)
@@ -179,9 +179,14 @@ include/dns/rdatastruct.h: gen \
 code.h:        gen
        ./gen -s ${srcdir} > code.h || { rm -f $@ ; exit 1; }
 
+gen: LFS_CFLAGS  = `getconf LFS_CFLAGS 2>/dev/null`
+gen: LFS_LDFLAGS = `getconf LFS_LDFLAGS 2>/dev/null`
+gen: LFS_LIBS    = `getconf LFS_LIBS 2>/dev/null`
 gen: gen.c
        ${BUILD_CC} ${BUILD_CFLAGS} -I${top_srcdir}/lib/isc/include \
-       ${BUILD_CPPFLAGS} ${BUILD_LDFLAGS} -o $@ ${srcdir}/gen.c ${BUILD_LIBS}
+       ${LFS_CFLAGS} ${LFS_LDFLAGS} \
+       ${BUILD_CPPFLAGS} ${BUILD_LDFLAGS} -o $@ ${srcdir}/gen.c \
+       ${BUILD_LIBS} ${LFS_LIBS}
 
 timestamp: include libdns.@A@
        touch timestamp