randomconfig fixes
authorDenys Vlasenko <vda.linux@googlemail.com>
Sun, 2 Jul 2017 23:22:13 +0000 (01:22 +0200)
committerDenys Vlasenko <vda.linux@googlemail.com>
Sun, 2 Jul 2017 23:22:13 +0000 (01:22 +0200)
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
networking/udhcp/common.h
networking/udhcp/packet.c
shell/hush.c

index 6907e7f60c459fe7d58b7fb85cf1e6e753573d6a..a9c23a1869192c6b1a208e83ae57a2d4ff448a52 100644 (file)
@@ -295,7 +295,9 @@ int FAST_FUNC udhcp_str2optset(const char *str,
                const struct dhcp_optflag *optflags,
                const char *option_strings);
 
+#if ENABLE_UDHCPC || ENABLE_UDHCPD
 void udhcp_init_header(struct dhcp_packet *packet, char type) FAST_FUNC;
+#endif
 
 int udhcp_recv_kernel_packet(struct dhcp_packet *packet, int fd) FAST_FUNC;
 
index 0a31f2643410a04144f684bfe9cd71a48257aa5e..9e1b46d2f71efbb7f295b3593f40d60d80772ec8 100644 (file)
@@ -12,6 +12,7 @@
 #include <netinet/if_ether.h>
 #include <netpacket/packet.h>
 
+#if ENABLE_UDHCPC || ENABLE_UDHCPD
 void FAST_FUNC udhcp_init_header(struct dhcp_packet *packet, char type)
 {
        memset(packet, 0, sizeof(*packet));
@@ -29,6 +30,7 @@ void FAST_FUNC udhcp_init_header(struct dhcp_packet *packet, char type)
                packet->options[0] = DHCP_END;
        udhcp_add_simple_option(packet, DHCP_MESSAGE_TYPE, type);
 }
+#endif
 
 #if defined CONFIG_UDHCP_DEBUG && CONFIG_UDHCP_DEBUG >= 2
 void FAST_FUNC udhcp_dump_packet(struct dhcp_packet *packet)
index 125463a56a0d4a295d9a7659f771b1a73c4646aa..f5c1e5bc17794045a882b95ed001ad6edcf542a1 100644 (file)
 /* Separate defines document which part of code implements what */
 #define BASH_PATTERN_SUBST ENABLE_HUSH_BASH_COMPAT
 #define BASH_SUBSTR        ENABLE_HUSH_BASH_COMPAT
-#define BASH_TEST2         ENABLE_HUSH_BASH_COMPAT
 #define BASH_SOURCE        ENABLE_HUSH_BASH_COMPAT
 #define BASH_HOSTNAME_VAR  ENABLE_HUSH_BASH_COMPAT
+#define BASH_TEST2         (ENABLE_HUSH_BASH_COMPAT && ENABLE_HUSH_TEST)
 
 
 /* Build knobs */
@@ -1457,7 +1457,7 @@ static void restore_redirected_FILEs(void)
                fl = fl->next;
        }
 }
-#if ENABLE_FEATURE_SH_STANDALONE
+#if ENABLE_FEATURE_SH_STANDALONE && BB_MMU
 static void close_all_FILE_list(void)
 {
        struct FILE_list *fl = G.FILE_list;
@@ -8575,8 +8575,9 @@ int hush_main(int argc, char **argv)
                        optarg++;
                        empty_trap_mask = bb_strtoull(optarg, &optarg, 16);
                        if (empty_trap_mask != 0) {
-                               int sig;
+                               IF_HUSH_TRAP(int sig;)
                                install_special_sighandlers();
+# if ENABLE_HUSH_TRAP
                                G_traps = xzalloc(sizeof(G_traps[0]) * NSIG);
                                for (sig = 1; sig < NSIG; sig++) {
                                        if (empty_trap_mask & (1LL << sig)) {
@@ -8584,6 +8585,7 @@ int hush_main(int argc, char **argv)
                                                install_sighandler(sig, SIG_IGN);
                                        }
                                }
+# endif
                        }
 # if ENABLE_HUSH_LOOPS
                        optarg++;