aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages/compression.scm
diff options
context:
space:
mode:
authorMarius Bakke <mbakke@fastmail.com>2018-08-02 13:54:44 +0200
committerMarius Bakke <mbakke@fastmail.com>2018-08-25 16:23:36 +0200
commitc7b87eeda272fcc6c9212452355ad5b4f780bb36 (patch)
tree22544ea6bea951acd930d67ec111358edabb7f4d /gnu/packages/compression.scm
parent95895d53b06015fa74f07643cf98f86ae21551d7 (diff)
downloadpatches-c7b87eeda272fcc6c9212452355ad5b4f780bb36.tar
patches-c7b87eeda272fcc6c9212452355ad5b4f780bb36.tar.gz
gnu: gzip: Fix FTBFS with glibc >= 2.28.
* gnu/packages/compression.scm (gzip)[arguments]: Add phase 'patch-for-glibc-2.28'.
Diffstat (limited to 'gnu/packages/compression.scm')
-rw-r--r--gnu/packages/compression.scm15
1 files changed, 15 insertions, 0 deletions
diff --git a/gnu/packages/compression.scm b/gnu/packages/compression.scm
index bdae21ff64..95cf533327 100644
--- a/gnu/packages/compression.scm
+++ b/gnu/packages/compression.scm
@@ -225,6 +225,21 @@ adding and extracting files to/from a tar archive.")
'(#:tests? #f
#:phases
(modify-phases %standard-phases
+ (add-after 'unpack 'patch-for-glibc-2.28
+ (lambda _
+ ;; Adjust the bundled gnulib to work with glibc 2.28. See e.g.
+ ;; "m4-gnulib-libio.patch". This is a phase rather than patch
+ ;; or snippet to work around <https://bugs.gnu.org/32347>.
+ (substitute* (find-files "lib" "\\.c$")
+ (("#if defined _IO_ftrylockfile")
+ "#if defined _IO_EOF_SEEN"))
+ (substitute* "lib/stdio-impl.h"
+ (("^/\\* BSD stdio derived implementations")
+ (string-append "#if !defined _IO_IN_BACKUP && defined _IO_EOF_SEEN\n"
+ "# define _IO_IN_BACKUP 0x100\n"
+ "#endif\n\n"
+ "/* BSD stdio derived implementations")))
+ #t))
(add-after 'unpack 'use-absolute-name-of-gzip
(lambda* (#:key outputs #:allow-other-keys)
(substitute* "gunzip.in"