From 7bcde5f00dc3a5c92f36bb6ef6bf849794cd766e Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Sun, 8 Apr 2018 17:23:27 +0200 Subject: [PATCH] libbb.h: always include sys/resource.h Signed-off-by: Denys Vlasenko --- coreutils/nice.c | 1 - debianutils/start_stop_daemon.c | 2 -- include/libbb.h | 1 + init/init.c | 1 - loginutils/login.c | 1 - loginutils/passwd.c | 1 - miscutils/time.c | 1 - networking/ntpd.c | 1 - runit/chpst.c | 1 - shell/shell_common.c | 1 - util-linux/renice.c | 1 - 11 files changed, 1 insertion(+), 11 deletions(-) diff --git a/coreutils/nice.c b/coreutils/nice.c index aa8b06cce..da1696c42 100644 --- a/coreutils/nice.c +++ b/coreutils/nice.c @@ -22,7 +22,6 @@ //usage: "Change scheduling priority, run PROG\n" //usage: "\n -n ADJUST Adjust priority by ADJUST" -#include #include "libbb.h" int nice_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; diff --git a/debianutils/start_stop_daemon.c b/debianutils/start_stop_daemon.c index c8b7fa8f2..fa77a7e00 100644 --- a/debianutils/start_stop_daemon.c +++ b/debianutils/start_stop_daemon.c @@ -116,8 +116,6 @@ Misc options: //usage: ) //usage: "\n -q Quiet" -#include - /* Override ENABLE_FEATURE_PIDFILE */ #define WANT_PIDFILE 1 #include "libbb.h" diff --git a/include/libbb.h b/include/libbb.h index ed9a562ff..c7bf33ef8 100644 --- a/include/libbb.h +++ b/include/libbb.h @@ -41,6 +41,7 @@ #include #include #include +#include #include #include #include diff --git a/init/init.c b/init/init.c index cac165fc7..6439e2bcd 100644 --- a/init/init.c +++ b/init/init.c @@ -130,7 +130,6 @@ #include "libbb.h" #include "common_bufsiz.h" #include -#include #ifdef __linux__ # include # include diff --git a/loginutils/login.c b/loginutils/login.c index fcdb9592c..25bb5203b 100644 --- a/loginutils/login.c +++ b/loginutils/login.c @@ -64,7 +64,6 @@ #include "libbb.h" #include "common_bufsiz.h" #include -#include #if ENABLE_SELINUX # include /* for is_selinux_enabled() */ diff --git a/loginutils/passwd.c b/loginutils/passwd.c index d0408d8b4..59f47fc7b 100644 --- a/loginutils/passwd.c +++ b/loginutils/passwd.c @@ -39,7 +39,6 @@ #include "libbb.h" #include -#include /* setrlimit */ static char* new_password(const struct passwd *pw, uid_t myuid, const char *algo) { diff --git a/miscutils/time.c b/miscutils/time.c index 61f078755..7d6a7a29f 100644 --- a/miscutils/time.c +++ b/miscutils/time.c @@ -32,7 +32,6 @@ //usage: "\n -a Append (else overwrite)" #include "libbb.h" -#include /* getrusage */ /* Information on the resources used by a child process. */ typedef struct { diff --git a/networking/ntpd.c b/networking/ntpd.c index 8205ab271..6cd497090 100644 --- a/networking/ntpd.c +++ b/networking/ntpd.c @@ -94,7 +94,6 @@ #include "libbb.h" #include #include /* For IPTOS_LOWDELAY definition */ -#include /* setpriority */ #include #ifndef IPTOS_LOWDELAY # define IPTOS_LOWDELAY 0x10 diff --git a/runit/chpst.c b/runit/chpst.c index 3ecb85cba..c2641ce8a 100644 --- a/runit/chpst.c +++ b/runit/chpst.c @@ -135,7 +135,6 @@ 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 c978693f9..9e58ee4fe 100644 --- a/shell/shell_common.c +++ b/shell/shell_common.c @@ -18,7 +18,6 @@ */ #include "libbb.h" #include "shell_common.h" -#include /* getrlimit */ const char defifsvar[] ALIGN1 = "IFS= \t\n"; const char defoptindvar[] ALIGN1 = "OPTIND=1"; diff --git a/util-linux/renice.c b/util-linux/renice.c index 46704591f..ee0fb3c8e 100644 --- a/util-linux/renice.c +++ b/util-linux/renice.c @@ -39,7 +39,6 @@ //usage: "\n -u Process user names" #include "libbb.h" -#include int renice_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; int renice_main(int argc UNUSED_PARAM, char **argv) -- 2.25.1