Fix resource.h related build failures on glibc trunk

Markus Trippelsdorf markus at
Fri May 4 12:39:22 UTC 2012

On a system running glibc trunk busybox doesn't compile:

loginutils/passwd.c: In function ‘passwd_main’:
loginutils/passwd.c:104:16: error: storage size of ‘rlimit_fsize’ isn’t known
loginutils/passwd.c:188:2: warning: implicit declaration of function ‘setrlimit’ [-Wimplicit-function-declaration]
loginutils/passwd.c:188:12: error: ‘RLIMIT_FSIZE’ undeclared (first use in this function)
loginutils/passwd.c:188:12: note: each undeclared identifier is reported only once for each function it appears in
loginutils/passwd.c:104:16: warning: unused variable ‘rlimit_fsize’ [-Wunused-variable]
miscutils/time.c:23:16: error: field ‘ru’ has incomplete type

Fix this by including sys/resource.h.

Signed-off-by: Markus Trippelsdorf <markus at>
 include/libbb.h |    1 +
 1 file changed, 1 insertion(+)

diff --git a/include/libbb.h b/include/libbb.h
index f12800f..e7806c2 100644
--- a/include/libbb.h
+++ b/include/libbb.h
@@ -40,6 +40,7 @@
 #include <sys/poll.h>
 #include <sys/ioctl.h>
 #include <sys/mman.h>
+#include <sys/resource.h>
 #include <sys/socket.h>
 #include <sys/stat.h>
 #include <sys/time.h>

More information about the busybox mailing list