From: Mike Frysinger Date: Fri, 6 Jul 2012 03:19:09 +0000 (-0400) Subject: include sys/resource.h where needed X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=246ea72843d5b7e9d4cd902dc5e9d71359196303;p=oweals%2Fbusybox.git include sys/resource.h where needed We use functions from sys/resource.h in misc applets, but don't include the header. This breaks building with newer glibc versions, so add the include where needed. Signed-off-by: Mike Frysinger (cherry picked from commit c5fe9f7b723f949457263ef8e22ab807d5b549ce) --- diff --git a/loginutils/passwd.c b/loginutils/passwd.c index b83db0083..a7006f054 100644 --- a/loginutils/passwd.c +++ b/loginutils/passwd.c @@ -15,6 +15,7 @@ #include "libbb.h" #include +#include /* setrlimit */ static void nuke_str(char *str) { diff --git a/miscutils/time.c b/miscutils/time.c index 945f15f0d..ffed38632 100644 --- a/miscutils/time.c +++ b/miscutils/time.c @@ -16,6 +16,7 @@ //usage: "\n -v Verbose" #include "libbb.h" +#include /* getrusage */ /* Information on the resources used by a child process. */ typedef struct { diff --git a/networking/inetd.c b/networking/inetd.c index 1308d74c7..00baf6971 100644 --- a/networking/inetd.c +++ b/networking/inetd.c @@ -165,6 +165,7 @@ //usage: "\n (default: 0 - disabled)" #include +#include /* setrlimit */ #include /* un.h may need this */ #include diff --git a/networking/ntpd.c b/networking/ntpd.c index 603801ec6..b885215a3 100644 --- a/networking/ntpd.c +++ b/networking/ntpd.c @@ -46,6 +46,7 @@ #include "libbb.h" #include #include /* For IPTOS_LOWDELAY definition */ +#include /* setpriority */ #include #ifndef IPTOS_LOWDELAY # define IPTOS_LOWDELAY 0x10 diff --git a/networking/ntpd_simple.c b/networking/ntpd_simple.c index 4ad44e4f3..1b7c66b84 100644 --- a/networking/ntpd_simple.c +++ b/networking/ntpd_simple.c @@ -7,6 +7,7 @@ */ #include "libbb.h" #include /* For IPTOS_LOWDELAY definition */ +#include /* setpriority */ #ifndef IPTOS_LOWDELAY # define IPTOS_LOWDELAY 0x10 #endif diff --git a/runit/chpst.c b/runit/chpst.c index ac296babf..ed72c8b8c 100644 --- a/runit/chpst.c +++ b/runit/chpst.c @@ -91,6 +91,7 @@ ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. //usage: "\n a SIGXCPU after N seconds" #include "libbb.h" +#include /* getrlimit */ /* Five applets here: chpst, envdir, envuidgid, setuidgid, softlimit. diff --git a/shell/shell_common.c b/shell/shell_common.c index 51c92d60e..780e27ebd 100644 --- a/shell/shell_common.c +++ b/shell/shell_common.c @@ -18,6 +18,7 @@ */ #include "libbb.h" #include "shell_common.h" +#include /* getrlimit */ const char defifsvar[] ALIGN1 = "IFS= \t\n";