randomconfig fixes
No binary (build failed)
—
(log yok)
| @@ -168,9 +168,12 @@ static int catv(unsigned opts, char **argv) | |
| int cat_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | |
| int cat_main(int argc UNUSED_PARAM, char **argv) | |
| { | |
| + | #if ENABLE_FEATURE_CATV || ENABLE_FEATURE_CATN |
| unsigned opts; | |
| - | opts = getopt32(argv, IF_FEATURE_CATV("^") |
| + | opts = |
| + | #endif |
| + | getopt32(argv, IF_FEATURE_CATV("^") |
| /* -u is ignored ("unbuffered") */ | |
| IF_FEATURE_CATV("etvA")IF_FEATURE_CATN("nb")"u" | |
| IF_FEATURE_CATV("\0" "Aetv" /* -A == -vet */) | |
| @@ -482,12 +482,11 @@ static NOINLINE unsigned display_single(const struct dnode *dn) | |
| int opt; | |
| #if ENABLE_FEATURE_LS_FILETYPES || ENABLE_FEATURE_LS_COLOR | |
| struct stat statbuf; | |
| - | char append; |
| #endif | |
| - | |
| #if ENABLE_FEATURE_LS_FILETYPES | |
| - | append = append_char(dn->dn_mode); |
| + | char append = append_char(dn->dn_mode); |
| #endif | |
| + | |
| opt = option_mask32; | |
| /* Do readlink early, so that if it fails, error message | |
| @@ -759,10 +759,13 @@ int stat_main(int argc UNUSED_PARAM, char **argv) | |
| IF_FEATURE_STAT_FORMAT(char *format = NULL;) | |
| int i; | |
| int ok; | |
| - | unsigned opts; |
| statfunc_ptr statfunc = do_stat; | |
| + | #if ENABLE_FEATURE_STAT_FILESYSTEM || ENABLE_SELINUX |
| + | unsigned opts; |
| - | opts = getopt32(argv, "^" |
| + | opts = |
| + | #endif |
| + | getopt32(argv, "^" |
| "tL" | |
| IF_FEATURE_STAT_FILESYSTEM("f") | |
| IF_SELINUX("Z") | |
| @@ -127,11 +127,9 @@ int uname_main(int argc UNUSED_PARAM, char **argv UNUSED_PARAM) | |
| { | |
| uname_info_t uname_info; | |
| IF_UNAME(const char *unknown_str = "unknown";) | |
| - | unsigned toprint; |
| - | |
| - | toprint = (1 << 4); /* "arch" = "uname -m" */ |
| - | |
| #if ENABLE_UNAME | |
| + | unsigned toprint = (1 << 4); /* "arch" = "uname -m" */ |
| + | |
| if (!ENABLE_BB_ARCH || applet_name[0] == 'u') { | |
| # if ENABLE_LONG_OPTS | |
| static const char uname_longopts[] ALIGN1 = | |
| @@ -124,6 +124,7 @@ lib-$(CONFIG_UNICODE_SUPPORT) += unicode.o | |
| lib-$(CONFIG_FEATURE_CHECK_NAMES) += die_if_bad_username.o | |
| lib-$(CONFIG_NC) += udp_io.o | |
| + | lib-$(CONFIG_NETCAT) += udp_io.o |
| lib-$(CONFIG_DNSD) += udp_io.o | |
| lib-$(CONFIG_NTPD) += udp_io.o | |
| lib-$(CONFIG_TFTP) += udp_io.o | |
| @@ -90,7 +90,8 @@ static bool BB_ispunct(CHAR_T c) { return ((unsigned)c < 256 && ispunct(c)); } | |
| # define CHAR_T char | |
| # define BB_isspace(c) isspace(c) | |
| # if ENABLE_FEATURE_EDITING_VI | |
| - | static bool BB_isalnum_or_underscore(CHAR_T c) { |
| + | static bool BB_isalnum_or_underscore(CHAR_T c) |
| + | { |
| return ((unsigned)c < 256 && isalnum(c)) || c == '_'; | |
| } | |
| # endif | |
| @@ -142,7 +142,9 @@ static const char addgroup_longopts[] ALIGN1 = | |
| int addgroup_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; | |
| int addgroup_main(int argc UNUSED_PARAM, char **argv) | |
| { | |
| + | #if ENABLE_FEATURE_ADDUSER_TO_GROUP |
| unsigned opts; | |
| + | #endif |
| const char *gid = "0"; | |
| /* need to be root */ | |
| @@ -154,7 +156,10 @@ int addgroup_main(int argc UNUSED_PARAM, char **argv) | |
| * addgroup --gid num group | |
| * addgroup user group | |
| * Check for min, max and missing args */ | |
| - | opts = getopt32long(argv, "^" "g:S" "\0" "-1:?2", addgroup_longopts, |
| + | #if ENABLE_FEATURE_ADDUSER_TO_GROUP |
| + | opts = |
| + | #endif |
| + | getopt32long(argv, "^" "g:S" "\0" "-1:?2", addgroup_longopts, |
| &gid | |
| ); | |
| /* move past the commandline options */ | |
| @@ -12,8 +12,9 @@ makeopts="-j9" | |
| test -f include/applets.h || { echo "No include/applets.h file"; exit 1; } | |
| apps="` | |
| grep ^IF_ include/applets.h \ | |
| - | | grep -v ^IF_FEATURE_ \ |
| + | | grep -v '^IF_FEATURE_' \ |
| | sed 's/IF_\([A-Z0-9._-]*\)(.*/\1/' \ | |
| + | | grep -v '^BUSYBOX$' \ |
| | sort | uniq | |
| `" | |
| @@ -208,7 +208,7 @@ struct globals { | |
| #define G_error_pkt_reason (G.error_pkt[3]) | |
| #define G_error_pkt_str ((char*)(G.error_pkt + 4)) | |
| - | #if ENABLE_FEATURE_TFTP_PROGRESS_BAR |
| + | #if ENABLE_FEATURE_TFTP_PROGRESS_BAR && ENABLE_FEATURE_TFTP_BLOCKSIZE |
| static void tftp_progress_update(void) | |
| { | |
| bb_progress_update(&G.pmt, 0, G.pos, G.size); | |
| @@ -227,6 +227,7 @@ static void tftp_progress_done(void) | |
| } | |
| } | |
| #else | |
| + | # define tftp_progress_update() ((void)0) |
| # define tftp_progress_init() ((void)0) | |
| # define tftp_progress_done() ((void)0) | |
| #endif | |
| @@ -108,7 +108,10 @@ int kill_main(int argc UNUSED_PARAM, char **argv) | |
| { | |
| char *arg; | |
| pid_t pid; | |
| - | int signo = SIGTERM, errors = 0, quiet = 0; |
| + | int signo = SIGTERM, errors = 0; |
| + | #if ENABLE_KILL || ENABLE_KILLALL |
| + | int quiet = 0; |
| + | #endif |
| #if KILL_APPLET_CNT == 1 | |
| # define is_killall ENABLE_KILLALL | |
| @@ -170,7 +173,9 @@ int kill_main(int argc UNUSED_PARAM, char **argv) | |
| /* The -q quiet option */ | |
| if (is_killall && arg[1] == 'q' && arg[2] == '\0') { | |
| + | #if ENABLE_KILL || ENABLE_KILLALL |
| quiet = 1; | |
| + | #endif |
| arg = *++argv; | |
| if (!arg) | |
| bb_show_usage(); | |
| @@ -66,6 +66,7 @@ while sleep 1; do | |
| continue | |
| fi | |
| fi | |
| + | grep -i 'warning:' "$dir/make.log" |
| rm -rf -- "$dir" | |
| let cnt++ | |
| done | |
| @@ -9952,7 +9952,7 @@ evalcommand(union node *cmd, int flags) | |
| switch (cmdentry.cmdtype) { | |
| default: { | |
| - | #if ENABLE_FEATURE_SH_NOFORK |
| + | #if ENABLE_FEATURE_SH_NOFORK && NUM_APPLETS > 1 |
| /* (1) BUG: if variables are set, we need to fork, or save/restore them | |
| * around run_nofork_applet() call. | |
| * (2) Should this check also be done in forkshell()? | |
| @@ -2278,7 +2278,7 @@ static int unset_local_var_len(const char *name, int name_len) | |
| return EXIT_SUCCESS; | |
| } | |
| - | #if ENABLE_HUSH_UNSET |
| + | #if ENABLE_HUSH_UNSET || ENABLE_HUSH_GETOPTS |
| static int unset_local_var(const char *name) | |
| { | |
| return unset_local_var_len(name, strlen(name)); | |
| @@ -2300,7 +2300,7 @@ static void unset_vars(char **strings) | |
| free(strings); | |
| } | |
| - | #if BASH_HOSTNAME_VAR || ENABLE_FEATURE_SH_MATH || ENABLE_HUSH_READ |
| + | #if BASH_HOSTNAME_VAR || ENABLE_FEATURE_SH_MATH || ENABLE_HUSH_READ || ENABLE_HUSH_GETOPTS |
| static void FAST_FUNC set_local_var_from_halves(const char *name, const char *val) | |
| { | |
| char *var = xasprintf("%s=%s", name, val); | |
| @@ -5534,7 +5534,7 @@ static int expand_on_ifs(int *ended_with_ifs, o_string *output, int n, const cha | |
| static char *encode_then_expand_string(const char *str, int process_bkslash, int do_unbackslash) | |
| { | |
| #if !BASH_PATTERN_SUBST | |
| - | const int do_unbackslash = 1; |
| + | enum { do_unbackslash = 1 }; |
| #endif | |
| char *exp_str; | |
| struct in_str input; | |
| @@ -8139,7 +8139,7 @@ static NOINLINE int run_pipe(struct pipe *pi) | |
| return rcode; | |
| } | |
| - | if (ENABLE_FEATURE_SH_NOFORK) { |
| + | if (ENABLE_FEATURE_SH_NOFORK && NUM_APPLETS > 1) { |
| int n = find_applet_by_name(argv_expanded[0]); | |
| if (n >= 0 && APPLET_IS_NOFORK(n)) { | |
| rcode = redirect_and_varexp_helper(&new_env, &old_vars, command, &squirrel, argv_expanded); | |
| @@ -8387,7 +8387,10 @@ static int run_list(struct pipe *pi) | |
| rword, cond_code, last_rword); | |
| sv_errexit_depth = G.errexit_depth; | |
| - | if (IF_HAS_KEYWORDS(rword == RES_IF || rword == RES_ELIF ||) |
| + | if ( |
| + | #if ENABLE_HUSH_IF |
| + | rword == RES_IF || rword == RES_ELIF || |
| + | #endif |
| pi->followup != PIPE_SEQ | |
| ) { | |
| G.errexit_depth++; | |