include sys/resource.h where needed
authorMike Frysinger <vapier@gentoo.org>
Fri, 6 Jul 2012 03:19:09 +0000 (23:19 -0400)
committerMike Frysinger <vapier@gentoo.org>
Fri, 6 Jul 2012 03:19:09 +0000 (23:19 -0400)
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 <vapier@gentoo.org>
loginutils/passwd.c
miscutils/time.c
networking/inetd.c
networking/ntpd.c
networking/ntpd_simple.c
runit/chpst.c
shell/shell_common.c

index b83db00..a7006f0 100644 (file)
@@ -15,6 +15,7 @@
 
 #include "libbb.h"
 #include <syslog.h>
+#include <sys/resource.h> /* setrlimit */
 
 static void nuke_str(char *str)
 {
index 945f15f..ffed386 100644 (file)
@@ -16,6 +16,7 @@
 //usage:     "\n       -v      Verbose"
 
 #include "libbb.h"
+#include <sys/resource.h> /* getrusage */
 
 /* Information on the resources used by a child process.  */
 typedef struct {
index 1308d74..00baf69 100644 (file)
 //usage:     "\n               (default: 0 - disabled)"
 
 #include <syslog.h>
+#include <sys/resource.h> /* setrlimit */
 #include <sys/socket.h> /* un.h may need this */
 #include <sys/un.h>
 
index 72e9d0b..5b92db6 100644 (file)
@@ -46,6 +46,7 @@
 #include "libbb.h"
 #include <math.h>
 #include <netinet/ip.h> /* For IPTOS_LOWDELAY definition */
+#include <sys/resource.h> /* setpriority */
 #include <sys/timex.h>
 #ifndef IPTOS_LOWDELAY
 # define IPTOS_LOWDELAY 0x10
index 4ad44e4..1b7c66b 100644 (file)
@@ -7,6 +7,7 @@
  */
 #include "libbb.h"
 #include <netinet/ip.h> /* For IPTOS_LOWDELAY definition */
+#include <sys/resource.h> /* setpriority */
 #ifndef IPTOS_LOWDELAY
 # define IPTOS_LOWDELAY 0x10
 #endif
index ac296ba..ed72c8b 100644 (file)
@@ -91,6 +91,7 @@ ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 //usage:     "\n                       a SIGXCPU after N seconds"
 
 #include "libbb.h"
+#include <sys/resource.h> /* getrlimit */
 
 /*
 Five applets here: chpst, envdir, envuidgid, setuidgid, softlimit.
index 51c92d6..780e27e 100644 (file)
@@ -18,6 +18,7 @@
  */
 #include "libbb.h"
 #include "shell_common.h"
+#include <sys/resource.h> /* getrlimit */
 
 const char defifsvar[] ALIGN1 = "IFS= \t\n";