aboutsummaryrefslogtreecommitdiff
path: root/package/sudo/0001-make-signame-include-unistd_h.patch
blob: 234cd716f042a664027726a8b8c4d78be0131d19 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
signame.c uses sudo_compat.h which in turn uses gid_t definitions
that are normally defined in unistd.h.
This doesn't seem to cause issues with (e)glibc systems, but it does break
uClibc-based builds.

Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>

diff -Nura sudo-1.8.12.orig/lib/util/mksigname.c sudo-1.8.12/lib/util/mksigname.c
--- sudo-1.8.12.orig/lib/util/mksigname.c	2015-02-09 15:40:10.000000000 -0300
+++ sudo-1.8.12/lib/util/mksigname.c	2015-02-17 09:20:05.126701093 -0300
@@ -44,6 +44,9 @@
 
     printf("#include <config.h>\n");
     printf("#include <signal.h>\n");
+    printf("#ifdef HAVE_UNISTD_H\n");
+    printf("#include <unistd.h>\n");
+    printf("#endif /* HAVE_UNISTD_H */\n");
     printf("#include \"sudo_compat.h\"\n\n");
     printf("const char *const sudo_sys_signame[NSIG] = {\n");
     for (i = 0; i < NSIG; i++) {