From 5f722eedf2f2f19a4b6bfffad5fe2229dfced7bb Mon Sep 17 00:00:00 2001 From: "Todd C. Miller" Date: Mon, 30 Aug 2010 09:08:16 -0400 Subject: [PATCH] Add #include of sys/types.h for .c files that include missing.h to be sure that size_t and ssize_t are defined. --HG-- branch : 1.7 --- error.c | 2 ++ getprogname.c | 2 ++ isblank.c | 1 + missing.h | 16 +++++++++------- mksiglist.c | 2 ++ sigaction.c | 1 + strerror.c | 1 + strsignal.c | 2 ++ sudo_noexec.c | 2 ++ 9 files changed, 22 insertions(+), 7 deletions(-) diff --git a/error.c b/error.c index 3e81b4fd3..50fde439c 100644 --- a/error.c +++ b/error.c @@ -14,6 +14,8 @@ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ +#include + #include #include #include diff --git a/getprogname.c b/getprogname.c index 96aa0bd0a..ab04a7ce2 100644 --- a/getprogname.c +++ b/getprogname.c @@ -18,6 +18,8 @@ * Materiel Command, USAF, under agreement number F39502-99-1-0512. */ +#include + #include #include diff --git a/isblank.c b/isblank.c index b8732b2bf..78f373937 100644 --- a/isblank.c +++ b/isblank.c @@ -15,6 +15,7 @@ */ #include +#include #include #undef isblank diff --git a/missing.h b/missing.h index d471603eb..8e2cc8350 100644 --- a/missing.h +++ b/missing.h @@ -22,6 +22,15 @@ #ifndef _SUDO_MISSING_H #define _SUDO_MISSING_H +#ifndef NULL +# include +#endif +#ifdef __STDC__ +# include +#else +# include +#endif + /* * Macros that may be missing on some Operating Systems */ @@ -309,13 +318,6 @@ const char *getprogname __P((void)); # define WCOREDUMP(x) ((x) & 0x80) #endif -#include -#ifdef __STDC__ -# include -#else -# include -#endif - /* Functions "missing" from libc. */ struct timeval; diff --git a/mksiglist.c b/mksiglist.c index 94ac1abf8..5e5d32745 100644 --- a/mksiglist.c +++ b/mksiglist.c @@ -17,6 +17,8 @@ #include +#include + #include #ifdef STDC_HEADERS # include diff --git a/sigaction.c b/sigaction.c index 824917bb4..aee0abfd0 100644 --- a/sigaction.c +++ b/sigaction.c @@ -18,6 +18,7 @@ * Materiel Command, USAF, under agreement number F39502-99-1-0512. */ +#include #include #include diff --git a/strerror.c b/strerror.c index 0cd995daf..fa2f6f639 100644 --- a/strerror.c +++ b/strerror.c @@ -18,6 +18,7 @@ * Materiel Command, USAF, under agreement number F39502-99-1-0512. */ +#include #include #include diff --git a/strsignal.c b/strsignal.c index 8414f646a..16da77633 100644 --- a/strsignal.c +++ b/strsignal.c @@ -14,6 +14,8 @@ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ +#include + #include #include diff --git a/sudo_noexec.c b/sudo_noexec.c index 3632207b8..5f450858c 100644 --- a/sudo_noexec.c +++ b/sudo_noexec.c @@ -16,6 +16,8 @@ #include +#include + #include #ifndef HAVE_TIMESPEC # include -- 2.40.0