summary refs log tree commit diff
path: root/gnu/packages/patches
diff options
context:
space:
mode:
authorMarius Bakke <marius@gnu.org>2021-06-06 18:57:19 +0200
committerMarius Bakke <marius@gnu.org>2021-06-06 19:49:56 +0200
commit1eee406b078c92a171493502bdd22bdd2bdf76c6 (patch)
treea77fdc0eb1d2a7bc9c0a17d38c4938e8e9f12b76 /gnu/packages/patches
parent0788e62d3e391d04e5a2fa6c399fcdfba5dcb579 (diff)
downloadguix-1eee406b078c92a171493502bdd22bdd2bdf76c6.tar.gz
gnu: nss: Prepare for GCC 10.
* gnu/packages/patches/nss-getcwd-nonnull.patch: New file.
* gnu/local.mk (dist_patch_DATA): Adjust accordingly.
* gnu/packages/nss.scm (nss)[source](patches): Add it.
Diffstat (limited to 'gnu/packages/patches')
-rw-r--r--gnu/packages/patches/nss-getcwd-nonnull.patch30
1 files changed, 30 insertions, 0 deletions
diff --git a/gnu/packages/patches/nss-getcwd-nonnull.patch b/gnu/packages/patches/nss-getcwd-nonnull.patch
new file mode 100644
index 0000000000..d367c37f32
--- /dev/null
+++ b/gnu/packages/patches/nss-getcwd-nonnull.patch
@@ -0,0 +1,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/coreconf/nsinstall/nsinstall.c b/coreconf/nsinstall/nsinstall.c
+--- a/coreconf/nsinstall/nsinstall.c
++++ b/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);