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 <vapier@gentoo.org>
This commit is contained in:
Mike Frysinger 2012-07-05 23:19:09 -04:00
parent 9ad8979ff1
commit c5fe9f7b72
7 changed files with 7 additions and 0 deletions

View File

@ -15,6 +15,7 @@
#include "libbb.h"
#include <syslog.h>
#include <sys/resource.h> /* setrlimit */
static void nuke_str(char *str)
{

View 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 {

View File

@ -165,6 +165,7 @@
//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>

View 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

View 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

View 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.

View File

@ -18,6 +18,7 @@
*/
#include "libbb.h"
#include "shell_common.h"
#include <sys/resource.h> /* getrlimit */
const char defifsvar[] ALIGN1 = "IFS= \t\n";