From 4074d8b182c6f60335dab996339660d9bd0dd266 Mon Sep 17 00:00:00 2001 From: Laurent Bercot Date: Tue, 16 May 2017 11:00:37 +0000 Subject: Accommodate some broken GNU toolchains by including sys/types.h in sysdeps tests --- src/include/skalibs/nonposix.h | 3 ++- src/sysdeps/trygetpeereid.c | 1 + src/sysdeps/trysetgroups.c | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/include/skalibs/nonposix.h b/src/include/skalibs/nonposix.h index 56a428a..7f064d5 100644 --- a/src/include/skalibs/nonposix.h +++ b/src/include/skalibs/nonposix.h @@ -53,7 +53,8 @@ #endif - /* old versions of BSD: system headers are not self-contained, + /* old versions of BSD and some broken GNU toolchains: + system headers are not self-contained, starting with sys/types.h normally always works. */ #include diff --git a/src/sysdeps/trygetpeereid.c b/src/sysdeps/trygetpeereid.c index 63cdbf1..10a411a 100644 --- a/src/sysdeps/trygetpeereid.c +++ b/src/sysdeps/trygetpeereid.c @@ -3,6 +3,7 @@ #undef _POSIX_C_SOURCE #undef _XOPEN_SOURCE +#include #include int main (void) diff --git a/src/sysdeps/trysetgroups.c b/src/sysdeps/trysetgroups.c index 530cda0..66b831f 100644 --- a/src/sysdeps/trysetgroups.c +++ b/src/sysdeps/trysetgroups.c @@ -23,6 +23,7 @@ #define __EXTENSIONS__ #endif +#include #include #include -- cgit v1.2.3