[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
02/08: gnu: glibc-mesboot0: Catch all cases of a glibc user not requesti
From: |
guix-commits |
Subject: |
02/08: gnu: glibc-mesboot0: Catch all cases of a glibc user not requesting 64-bit offsets and then using readdir regardless. |
Date: |
Sun, 4 Oct 2020 03:30:10 -0400 (EDT) |
dannym pushed a commit to branch wip-file-offset-bits-64-sledgehammer
in repository guix.
commit 156e6ef349e56439234f33f9b3a3c867d59aa37d
Author: Danny Milosavljevic <dannym@scratchpost.org>
AuthorDate: Sun Oct 4 00:04:40 2020 +0200
gnu: glibc-mesboot0: Catch all cases of a glibc user not requesting 64-bit
offsets and then using readdir regardless.
* gnu/packages/commencement.scm
(glibc-mesboot0)[arguments]#<:phases>[patch-dirent]:
Catch all cases of a glibc user not requesting 64-bit offsets and then using
readdir regardless.
---
gnu/packages/commencement.scm | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm
index e5a4caa..8529313 100644
--- a/gnu/packages/commencement.scm
+++ b/gnu/packages/commencement.scm
@@ -1398,6 +1398,26 @@ ac_cv_c_float_format='IEEE (little-endian)'
,(string-append "--prefix=" out)))
#:phases
(modify-phases %standard-phases
+ (add-after 'unpack 'patch-dirent
+ (lambda _
+ ;; See package "glibc" for why this is necessary.
+ (let ((port (open-file "dirent/dirent.h" "a")))
+ (display "
+#ifndef _LIBC
+#if __SIZEOF_LONG__ < 8
+#ifndef __USE_FILE_OFFSET64
+#if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 32
+#warning \"Using -D_FILE_OFFSET_BITS=32 and using readdir is a bad idea, see
<https://bugzilla.kernel.org/show_bug.cgi?id=205957>\"
+#else
+#undef readdir
+#define readdir @READDIR_WITHOUT_FILE_OFFSET64_IS_A_REALLY_BAD_IDEA@
+#endif
+#endif
+#endif
+#endif
+" port)
+ (close-port port))
+ #t))
(add-after 'unpack 'apply-boot-patch
(lambda* (#:key inputs #:allow-other-keys)
(and (let ((patch (assoc-ref inputs "boot-patch")))
- branch wip-file-offset-bits-64-sledgehammer created (now d1edfd0), guix-commits, 2020/10/04
- 01/08: gnu: glibc: Catch all cases of a glibc user not requesting 64-bit offsets and then using readdir regardless., guix-commits, 2020/10/04
- 04/08: gnu: glibc: Do not explicitly set _FILE_OFFSET_BITS., guix-commits, 2020/10/04
- 07/08: gnu: boost: Explicity declare the _FILE_OFFSET_BITS we want., guix-commits, 2020/10/04
- 05/08: gnu: glibc-mesboot0: Do not explicitly set _FILE_OFFSET_BITS., guix-commits, 2020/10/04
- 03/08: build-system/gnu: Explicity declare the _FILE_OFFSET_BITS we want., guix-commits, 2020/10/04
- 06/08: gnu: rhash: Explicity declare the _FILE_OFFSET_BITS we want., guix-commits, 2020/10/04
- 08/08: gnu: lz4: Explicity declare the _FILE_OFFSET_BITS we want., guix-commits, 2020/10/04
- 02/08: gnu: glibc-mesboot0: Catch all cases of a glibc user not requesting 64-bit offsets and then using readdir regardless.,
guix-commits <=