summary refs log tree commit diff
diff options
context:
space:
mode:
authorDanny Milosavljevic <dannym@scratchpost.org>2020-09-29 01:36:00 +0200
committerDanny Milosavljevic <dannym@scratchpost.org>2020-09-29 01:36:00 +0200
commit56a9e299c216eb68c949e0b406d17ddea176e073 (patch)
tree76c8aedd66f91f533c9b07d48c4ed6b5f0a12ab7
parent5b886899330fdddf3798b03016a01fc973d768cc (diff)
downloadguix-56a9e299c216eb68c949e0b406d17ddea176e073.tar.gz
gnu: libtool: Explicity declare the _FILE_OFFSET_BITS we want.
* gnu/packages/autotools.scm (libtool)[arguments]<#:phases>[ensure-file-offset-bits-64]:
Explicity declare the _FILE_OFFSET_BITS we want.
-rw-r--r--gnu/packages/autotools.scm10
1 files changed, 10 insertions, 0 deletions
diff --git a/gnu/packages/autotools.scm b/gnu/packages/autotools.scm
index 96f2925180..febaabcf99 100644
--- a/gnu/packages/autotools.scm
+++ b/gnu/packages/autotools.scm
@@ -431,6 +431,16 @@ Makefile, simplifying the entire process for the developer.")
 
        #:phases
        (modify-phases %standard-phases
+         (add-before 'configure 'ensure-file-offset-bits-64
+           (lambda _
+             (setenv "CFLAGS" "-D_FILE_OFFSET_BITS=64")
+             (substitute* "libltdl/libltdl/lt__dirent.h"
+              (("#define LT__DIRENT_H 1") "#define LT__DIRENT_H 1
+#if !defined(_FILE_OFFSET_BITS) || _FILE_OFFSET_BITS != 64
+#error \"libltdl was compiled with _FILE_OFFSET_BITS == 64, so you have to be, too (since it exports readdir)\"
+#endif
+"))
+             #t))
          (add-before 'check 'pre-check
            (lambda* (#:key inputs native-inputs #:allow-other-keys)
              ;; Run the test suite in parallel, if possible.