aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2021-11-05 23:14:42 -0400
committerMike Frysinger <vapier@gentoo.org>2021-11-05 23:14:42 -0400
commit632cc66ba52eb6aa7fd3e457c64d9186389a20b4 (patch)
treef8ce207063dd445841183f1d0d832c92f41b3c6d /configure.ac
parentbuild: require at least a C99 compiler (diff)
downloadsandbox-632cc66ba52eb6aa7fd3e457c64d9186389a20b4.tar.gz
sandbox-632cc66ba52eb6aa7fd3e457c64d9186389a20b4.tar.bz2
sandbox-632cc66ba52eb6aa7fd3e457c64d9186389a20b4.zip
change FS calls to use 64-bit interfaces explicitly
Make sure we use 64-bit FS interfaces when accessing the FS. This is needed not only to stat or open large files, but even files with 64-bit inodes. Bug: https://bugs.gentoo.org/583282 Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac7
1 files changed, 7 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 56ca87f..698051f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -25,6 +25,13 @@ AS_IF([test "$ac_cv_prog_cc_c99" = "no"], [AC_MSG_ERROR([A C99+ compiler is requ
AM_PROG_CC_C_O
AC_ISC_POSIX
AC_USE_SYSTEM_EXTENSIONS
+dnl http://www.gnu.org/s/libc/manual/html_node/Feature-Test-Macros.html
+dnl _LARGEFILE_SOURCE: enable support for new LFS funcs (ftello/etc...)
+dnl _LARGEFILE64_SOURCE: enable support for 64-bit variants (off64_t/fseeko64/etc...)
+dnl NB: We do not want -D_FILE_OFFSET_BITS=64 because we need to interpose both 32-bit
+dnl and 64-bit FS interfaces, and having the C library rewrite them makes that difficult.
+dnl Along those lines, we do not use AC_SYS_LARGEFILE.
+AS_VAR_APPEND([CPPFLAGS], [" -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE"])
dnl Checks for programs.
AM_PROG_AR