unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
blob 37c1b1c539b37221e2aff9d0cd8877ca969fa363 959 bytes (raw)
name: packages/patches/nss-getcwd-nonnull.patch 	 # note: path name is non-authoritative(*)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
 
Disable -Werror=nonnull on getcwd(0, 4096) because GCC incorrectly warns that
the second argument should be NULL with recent glibc.  See:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96832
https://sourceware.org/bugzilla/show_bug.cgi?id=26545

diff --git a/nss/coreconf/nsinstall/nsinstall.c b/nss/coreconf/nsinstall/nsinstall.c
--- a/nss/coreconf/nsinstall/nsinstall.c
+++ b/nss/coreconf/nsinstall/nsinstall.c
@@ -236,14 +236,20 @@ main(int argc, char **argv)
 	return 0;
 
     if (!cwd) {
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wnonnull"
 	cwd = GETCWD(0, PATH_MAX);
+#pragma GCC diagnostic pop
 	if (!cwd)
 	    fail("could not get CWD");
     }
 
     /* make sure we can get into todir. */
     xchdir(todir);
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wnonnull"
     todir = GETCWD(0, PATH_MAX);
+#pragma GCC diagnostic pop
     if (!todir)
 	fail("could not get CWD in todir");
     tdlen = strlen(todir);

debug log:

solving 37c1b1c539b37221e2aff9d0cd8877ca969fa363 ...
found 37c1b1c539b37221e2aff9d0cd8877ca969fa363 in https://git.savannah.gnu.org/cgit/guix.git

(*) Git path names are given by the tree(s) the blob belongs to.
    Blobs themselves have no identifier aside from the hash of its contents.^

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).