From: Todd C. Miller Date: Tue, 17 Feb 2015 13:21:06 +0000 (-0700) Subject: Include unistd.h in siglist.c and signame.c to get gid_t which X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8cae9876f3e8156c6e04999b25c3439d3e62f170;p=sudo Include unistd.h in siglist.c and signame.c to get gid_t which is used by sudo_compat.h. Bug #686 --- diff --git a/lib/util/mksiglist.c b/lib/util/mksiglist.c index 432f30b43..710ff92be 100644 --- a/lib/util/mksiglist.c +++ b/lib/util/mksiglist.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010-2012 Todd C. Miller + * Copyright (c) 2010-2012, 2015 Todd C. Miller * * 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 \n"); printf("#include \n"); + printf("#ifdef HAVE_UNISTD_H\n"); + printf("# include \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++) { diff --git a/lib/util/mksigname.c b/lib/util/mksigname.c index 4502ffdcb..3d0d9c14b 100644 --- a/lib/util/mksigname.c +++ b/lib/util/mksigname.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010-2012 Todd C. Miller + * Copyright (c) 2010-2012, 2015 Todd C. Miller * * 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 \n"); printf("#include \n"); + printf("#ifdef HAVE_UNISTD_H\n"); + printf("# include \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++) {