From: Todd C. Miller Date: Thu, 9 Apr 2015 16:58:04 +0000 (-0600) Subject: Include sys/types.h instead of unistd.h to get uid_t and gid_t. X-Git-Tag: SUDO_1_8_14^2~168 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=eeca3b0ca42663def08fcb929256225c76ec7933;p=sudo Include sys/types.h instead of unistd.h to get uid_t and gid_t. Add missing include of sys/types.h to a few places. --- diff --git a/lib/util/getopt_long.c b/lib/util/getopt_long.c index e802a0720..540dd461e 100644 --- a/lib/util/getopt_long.c +++ b/lib/util/getopt_long.c @@ -52,6 +52,7 @@ #include +#include #include #ifdef STDC_HEADERS # include diff --git a/lib/util/mksiglist.c b/lib/util/mksiglist.c index 710ff92be..80824e3da 100644 --- a/lib/util/mksiglist.c +++ b/lib/util/mksiglist.c @@ -43,10 +43,8 @@ main(int argc, char *argv[]) #include "mksiglist.h" printf("#include \n"); + 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 3d0d9c14b..124d78b2a 100644 --- a/lib/util/mksigname.c +++ b/lib/util/mksigname.c @@ -43,10 +43,8 @@ main(int argc, char *argv[]) #include "mksigname.h" printf("#include \n"); + 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++) { diff --git a/lib/util/regress/fnmatch/fnm_test.c b/lib/util/regress/fnmatch/fnm_test.c index 951f1ce0a..d35af2c79 100644 --- a/lib/util/regress/fnmatch/fnm_test.c +++ b/lib/util/regress/fnmatch/fnm_test.c @@ -6,6 +6,7 @@ #include +#include #include #include #ifdef HAVE_STRING_H diff --git a/lib/util/regress/glob/globtest.c b/lib/util/regress/glob/globtest.c index 01d088633..d8930916d 100644 --- a/lib/util/regress/glob/globtest.c +++ b/lib/util/regress/glob/globtest.c @@ -6,6 +6,7 @@ #include +#include #include #include #ifdef HAVE_STRING_H diff --git a/lib/util/sha2.c b/lib/util/sha2.c index 8243b50a2..0a85c9742 100644 --- a/lib/util/sha2.c +++ b/lib/util/sha2.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013 Todd C. Miller + * Copyright (c) 2013-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 @@ -25,6 +25,7 @@ #include +#include #include #ifdef STDC_HEADERS # include @@ -57,7 +58,6 @@ #else # include "compat/endian.h" #endif -#include #include "sudo_compat.h" #include "compat/sha2.h" diff --git a/plugins/sudoers/regress/parser/check_base64.c b/plugins/sudoers/regress/parser/check_base64.c index 60d3d6bad..6eb56d2c9 100644 --- a/plugins/sudoers/regress/parser/check_base64.c +++ b/plugins/sudoers/regress/parser/check_base64.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013 Todd C. Miller + * Copyright (c) 2013-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 @@ -16,6 +16,7 @@ #include +#include #include #ifdef STDC_HEADERS # include diff --git a/plugins/sudoers/regress/parser/check_digest.c b/plugins/sudoers/regress/parser/check_digest.c index 118b65ed5..9b4b53ee1 100644 --- a/plugins/sudoers/regress/parser/check_digest.c +++ b/plugins/sudoers/regress/parser/check_digest.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013 Todd C. Miller + * Copyright (c) 2013-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 @@ -16,6 +16,7 @@ #include +#include #include #ifdef STDC_HEADERS # include diff --git a/plugins/sudoers/regress/parser/check_hexchar.c b/plugins/sudoers/regress/parser/check_hexchar.c index 6d2c09340..b5c49579a 100644 --- a/plugins/sudoers/regress/parser/check_hexchar.c +++ b/plugins/sudoers/regress/parser/check_hexchar.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014 Todd C. Miller + * Copyright (c) 2014-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 @@ -16,6 +16,7 @@ #include +#include #include #ifdef STDC_HEADERS # include