aboutsummaryrefslogtreecommitdiff
path: root/shell
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2017-07-03 01:22:13 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2017-07-03 01:22:13 +0200
commit4ee824f6ba3f35228f1c48e21681aa532a7dc23f (patch)
tree75011c43b93dc3deb5587f1a6b9424f3bef5dd03 /shell
parent48c803a2064d5ae24540760f13a21f092247bd82 (diff)
downloadbusybox-4ee824f6ba3f35228f1c48e21681aa532a7dc23f.tar.gz
randomconfig fixes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'shell')
-rw-r--r--shell/hush.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/shell/hush.c b/shell/hush.c
index 125463a56..f5c1e5bc1 100644
--- a/shell/hush.c
+++ b/shell/hush.c
@@ -331,9 +331,9 @@
/* 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++;