summaryrefslogtreecommitdiff
path: root/gnu/packages/compression.scm
diff options
context:
space:
mode:
authorEfraim Flashner <efraim@flashner.co.il>2018-10-18 21:46:09 +0300
committerEfraim Flashner <efraim@flashner.co.il>2018-10-18 21:46:33 +0300
commitb50d58b3445a85bf4395e2b767da10c2e3438902 (patch)
treedd5aa65dbdd6d37245d9e6ec83b8cec5c0a6c5bc /gnu/packages/compression.scm
parentf793b4ef96d53c548494b4b15b99a31d05c449a3 (diff)
gnu: sharutils: Fix bundled gnulib.
* gnu/packages/compression.scm (sharutils)[source]: Add snippet to fix bundled gnulib.
Diffstat (limited to 'gnu/packages/compression.scm')
-rw-r--r--gnu/packages/compression.scm18
1 files changed, 17 insertions, 1 deletions
diff --git a/gnu/packages/compression.scm b/gnu/packages/compression.scm
index 4137dca8bb..44d1fd4bb5 100644
--- a/gnu/packages/compression.scm
+++ b/gnu/packages/compression.scm
@@ -584,7 +584,23 @@ decompressors when faced with corrupted input.")
(patches (search-patches "sharutils-CVE-2018-1000097.patch"))
(sha256
(base32
- "16isapn8f39lnffc3dp4dan05b7x6mnc76v6q5nn8ysxvvvwy19b"))))
+ "16isapn8f39lnffc3dp4dan05b7x6mnc76v6q5nn8ysxvvvwy19b"))
+ (modules '((guix build utils)))
+ (snippet
+ '(begin
+ ;; 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))))
(build-system gnu-build-system)
(inputs
`(("which" ,which)))