From acbd270e3706b8ce260cef6056454ed1f75fd4b1 Mon Sep 17 00:00:00 2001 From: "Peter S. Mazinger" Date: Wed, 21 Sep 2005 23:33:29 +0000 Subject: include headers only if the related option is enabled --- libc/pwd_grp/pwd_grp.c | 3 +++ libc/unistd/getopt.c | 3 +++ libc/unistd/sysconf.c | 2 ++ librt/kernel-posix-timers.h | 5 +++++ 4 files changed, 13 insertions(+) diff --git a/libc/pwd_grp/pwd_grp.c b/libc/pwd_grp/pwd_grp.c index 91c0d83f5..e56b545d6 100644 --- a/libc/pwd_grp/pwd_grp.c +++ b/libc/pwd_grp/pwd_grp.c @@ -41,7 +41,10 @@ #include #include #include +#include +#ifdef __HAS_SHADOW__ #include +#endif #ifdef __UCLIBC_HAS_THREADS__ #include #endif diff --git a/libc/unistd/getopt.c b/libc/unistd/getopt.c index 504f3764c..0dc0e0509 100644 --- a/libc/unistd/getopt.c +++ b/libc/unistd/getopt.c @@ -26,10 +26,13 @@ * Modified once again for uClibc by Erik Andersen 8/7/02 */ +#include #include #include #include +#ifdef __UCLIBC_HAS_GETTEXT_AWARENESS__ #include +#endif #ifdef __UCLIBC_MJN3_ONLY__ #warning TODO: Enable gettext awareness. diff --git a/libc/unistd/sysconf.c b/libc/unistd/sysconf.c index f5b49a10f..902697b45 100644 --- a/libc/unistd/sysconf.c +++ b/libc/unistd/sysconf.c @@ -29,7 +29,9 @@ #include #include #include +#ifdef __UCLIBC_HAS_REGEX__ #include +#endif #ifndef __UCLIBC_CLK_TCK_CONST #error __UCLIBC_CLK_TCK_CONST not defined! diff --git a/librt/kernel-posix-timers.h b/librt/kernel-posix-timers.h index 5724af01b..bf246c925 100644 --- a/librt/kernel-posix-timers.h +++ b/librt/kernel-posix-timers.h @@ -2,10 +2,13 @@ * kernel-posix-timers.h - kernel-dependent definitions for POSIX timers. */ +#include #include #include #include +#ifdef __UCLIBC_HAS_THREADS__ #include +#endif /* Type of timers in the kernel */ typedef int kernel_timer_t; @@ -27,5 +30,7 @@ struct timer { /* Parameters for the thread to be started for SIGEV_THREAD */ void (*thrfunc) (sigval_t); sigval_t sival; +#ifdef __UCLIBC_HAS_THREADS__ pthread_attr_t attr; +#endif }; -- cgit v1.2.3