diff --git a/include/time.h b/include/time.h index 60cc0f44..161d006f 100644 --- a/include/time.h +++ b/include/time.h @@ -59,7 +59,7 @@ struct timespec int clock_gettime (clockid_t clk_id, struct timespec *tp); struct tm *localtime (time_t const *timep); struct tm *gmtime (time_t const *time); -int mktime (struct tm *broken_time); +time_t mktime (struct tm *broken_time); int nanosleep (struct timespec const *requested_time, struct timespec const *remaining); time_t time (time_t * tloc); diff --git a/lib/stub/getgrgid.c b/lib/stub/getgrgid.c index 9859b8dd..88898714 100644 --- a/lib/stub/getgrgid.c +++ b/lib/stub/getgrgid.c @@ -19,6 +19,7 @@ */ #include +#include #include struct group * @@ -27,8 +28,13 @@ getgrgid (gid_t gid) static int stub = 0; if (__mes_debug () && !stub) eputs ("getgrid stub\n"); - static char *groups[2] = {"root", 0 }; - static struct group root = {"root", 0, groups}; + static char *groups[2] = { "root", 0 }; +#if SYSTEM_LIBC + static struct group root = { "root", 0, 0 }; + root.gr_mem = groups; +#else + static struct group root = { "root", 0, groups }; +#endif stub = 1; errno = 0; return &root; diff --git a/lib/stub/getgrnam.c b/lib/stub/getgrnam.c index 466d738e..4efde888 100644 --- a/lib/stub/getgrnam.c +++ b/lib/stub/getgrnam.c @@ -19,6 +19,7 @@ */ #include +#include #include struct group * @@ -27,8 +28,13 @@ getgrnam (char const *name) static int stub = 0; if (__mes_debug () && !stub) eputs ("getgrid stub\n"); - static char *groups[2] = {"root", 0 }; - static struct group root = {"root", 0, groups}; + static char *groups[2] = { "root", 0 }; +#if SYSTEM_LIBC + static struct group root = { "root", 0, 0 }; + root.gr_mem = groups; +#else + static struct group root = { "root", 0, groups }; +#endif stub = 1; errno = 0; return &root; diff --git a/lib/stub/getpgid.c b/lib/stub/getpgid.c index f82d3c5e..8ad82ee2 100644 --- a/lib/stub/getpgid.c +++ b/lib/stub/getpgid.c @@ -19,6 +19,7 @@ */ #include +#include #include int diff --git a/lib/stub/getpgrp.c b/lib/stub/getpgrp.c index 7b7510b1..a9ddcaae 100644 --- a/lib/stub/getpgrp.c +++ b/lib/stub/getpgrp.c @@ -19,6 +19,7 @@ */ #include +#include #include pid_t diff --git a/lib/stub/mktime.c b/lib/stub/mktime.c index 65e49acf..093d73b6 100644 --- a/lib/stub/mktime.c +++ b/lib/stub/mktime.c @@ -19,9 +19,10 @@ */ #include +#include #include -int +time_t mktime (struct tm *broken_time) { static int stub = 0; diff --git a/lib/stub/setgrent.c b/lib/stub/setgrent.c index 5e6e27e2..daa6d89d 100644 --- a/lib/stub/setgrent.c +++ b/lib/stub/setgrent.c @@ -19,6 +19,7 @@ */ #include +#include void setgrent (void)