summary refs log tree commit diff
path: root/pkgs/os-specific
diff options
context:
space:
mode:
authorPhilip Potter <philip.g.potter@gmail.com>2016-08-30 23:05:07 +0100
committerFranz Pletz <fpletz@fnordicwalking.de>2016-08-31 00:05:07 +0200
commit66726acfae5a60457a4582df78c452a813879325 (patch)
tree77e6c84e83fa31e8ac5690db00aa61014a13f92b /pkgs/os-specific
parent986e64280e40edb7b03e40216204e2f7fbe4e396 (diff)
downloadnixlib-66726acfae5a60457a4582df78c452a813879325.tar
nixlib-66726acfae5a60457a4582df78c452a813879325.tar.gz
nixlib-66726acfae5a60457a4582df78c452a813879325.tar.bz2
nixlib-66726acfae5a60457a4582df78c452a813879325.tar.lz
nixlib-66726acfae5a60457a4582df78c452a813879325.tar.xz
nixlib-66726acfae5a60457a4582df78c452a813879325.tar.zst
nixlib-66726acfae5a60457a4582df78c452a813879325.zip
sysklogd: fix compile error (#18133)
sysklogd was failing to build because it didn't know the size of the
`union wait` type.

Running `git bisect` showed 9744c7768d0e6920623a16a4e9d604de2fd52f34,
which bumped glibc from 2.23 to 2.24, as the likely suspect.  This is
corroborated by evidence such as this email:
https://lists.debian.org/debian-glibc/2016/08/msg00069.html

Linux from scratch recommends changing `union wait` to `int`:
http://www.linuxfromscratch.org/lfs/view/development/chapter06/sysklogd.html

Therefore, that's what this commit does.
Diffstat (limited to 'pkgs/os-specific')
-rw-r--r--pkgs/os-specific/linux/sysklogd/default.nix2
-rw-r--r--pkgs/os-specific/linux/sysklogd/union-wait.patch11
2 files changed, 12 insertions, 1 deletions
diff --git a/pkgs/os-specific/linux/sysklogd/default.nix b/pkgs/os-specific/linux/sysklogd/default.nix
index c1cf77e63c8e..513503ff98e6 100644
--- a/pkgs/os-specific/linux/sysklogd/default.nix
+++ b/pkgs/os-specific/linux/sysklogd/default.nix
@@ -8,7 +8,7 @@ stdenv.mkDerivation {
     sha256 = "00f2wy6f0qng7qzga4iicyzl9j8b7mp6mrpfky5jxj93ms2w2rji";
   };
 
-  patches = [ ./systemd.patch ];
+  patches = [ ./systemd.patch ./union-wait.patch ];
 
   NIX_CFLAGS_COMPILE = "-DSYSV";
 
diff --git a/pkgs/os-specific/linux/sysklogd/union-wait.patch b/pkgs/os-specific/linux/sysklogd/union-wait.patch
new file mode 100644
index 000000000000..e4bffa5d6953
--- /dev/null
+++ b/pkgs/os-specific/linux/sysklogd/union-wait.patch
@@ -0,0 +1,11 @@
+--- sysklogd-1.5-old/syslogd.c	2016-08-30 22:50:59.812926945 +0100
++++ sysklogd-1.5/syslogd.c	2016-08-30 22:51:12.008842890 +0100
+@@ -2094,7 +2094,7 @@
+ 	(void) signal(SIGCHLD, reapchild);	/* reset signal handler -ASP */
+ 	wait ((int *)0);
+ #else
+-	union wait status;
++	int status;
+ 
+ 	while (wait3(&status, WNOHANG, (struct rusage *) NULL) > 0)
+ 		;