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 b83db0083624bf47866c9f2c9b914781632646c0..a7006f0548f51f21d739c472ba65276da676149d 100644 (file)
@@ -15,6 +15,7 @@
 
 #include "libbb.h"
 #include <syslog.h>
+#include <sys/resource.h> /* setrlimit */
 
 static void nuke_str(char *str)
 {
index 945f15f0d56c7eee322dbfdfdc68dcc4c6b44c83..ffed38632995eb43498db5ff4460557442406235 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 1308d74c7436110af84736bde60d23be77d2a02d..00baf6971db579d67371de2e1dbc5af189786f3d 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 72e9d0be2161646ba5d6bfd7ff7570b7b219b619..5b92db6f66a822d3cfff9a2d24e8f59dd257d5f8 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 4ad44e4f35bbfbfb1a1f9460505a3d668ba9d9b9..1b7c66b8461acf64373cec0e0742e6c477650709 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 ac296babf2cc8af193461320ecc58f399b8856b0..ed72c8b8cdb7472d33331865f60f5fe66d7b54e5 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 51c92d60e98acd6a4f3d1631318e5bdccedf1bb8..780e27ebd4f05ea4b9015c45ffe8c4ca9935e5d6 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";