gnu: libltdl: Explicity declare the _FILE_OFFSET_BITS we want.

* gnu/packages/autotools.scm (libltdl)[arguments]<#:phases>[ensure-file-offset-bits-64]:
Explicity declare the _FILE_OFFSET_BITS we want.
This commit is contained in:
Danny Milosavljevic 2020-09-29 01:37:14 +02:00
parent 56a9e299c2
commit 358970fed6
No known key found for this signature in database
GPG key ID: E71A35542C30BAA5

View file

@ -487,6 +487,16 @@ (define-public libltdl
(arguments
'(#:configure-flags '("--enable-ltdl-install") ;really install it
#:phases (modify-phases %standard-phases
(add-after 'unpack '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 'configure 'change-directory
(lambda _ (chdir "libltdl") #t)))))