]> granicus.if.org Git - sudo/commitdiff
Include unistd.h in siglist.c and signame.c to get gid_t which
authorTodd C. Miller <Todd.Miller@courtesan.com>
Tue, 17 Feb 2015 13:21:06 +0000 (06:21 -0700)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Tue, 17 Feb 2015 13:21:06 +0000 (06:21 -0700)
is used by sudo_compat.h.  Bug #686

lib/util/mksiglist.c
lib/util/mksigname.c

index 432f30b43085b5375b7d177bbb8a2d7c8c52a0c1..710ff92be164e889ad69d29429defa17041fa10d 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2010-2012 Todd C. Miller <Todd.Miller@courtesan.com>
+ * Copyright (c) 2010-2012, 2015 Todd C. Miller <Todd.Miller@courtesan.com>
  *
  * Permission to use, copy, modify, and distribute this software for any
  * purpose with or without fee is hereby granted, provided that the above
@@ -44,6 +44,9 @@ main(int argc, char *argv[])
 
     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_siglist[NSIG] = {\n");
     for (i = 0; i < NSIG; i++) {
index 4502ffdcba04f3f2eaa1898353ca597b79c0b1b4..3d0d9c14be41d4295d1a2c36430df33123a09fab 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2010-2012 Todd C. Miller <Todd.Miller@courtesan.com>
+ * Copyright (c) 2010-2012, 2015 Todd C. Miller <Todd.Miller@courtesan.com>
  *
  * Permission to use, copy, modify, and distribute this software for any
  * purpose with or without fee is hereby granted, provided that the above
@@ -44,6 +44,9 @@ main(int argc, char *argv[])
 
     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++) {