diff options
author | Ron Yorston <rmy@pobox.com> | 2024-01-23 09:24:38 +0000 |
---|---|---|
committer | Ron Yorston <rmy@pobox.com> | 2024-01-23 09:30:11 +0000 |
commit | 99de7009698d868c0d139133ed4fa445be8cae50 (patch) | |
tree | 4f6f18253f799b80ef26add546a40118eec8b193 /shell | |
parent | d7c65f24a9f6cf61a1fc629d5d2d48cc64d5bc41 (diff) | |
download | busybox-w32-99de7009698d868c0d139133ed4fa445be8cae50.tar.gz busybox-w32-99de7009698d868c0d139133ed4fa445be8cae50.tar.bz2 busybox-w32-99de7009698d868c0d139133ed4fa445be8cae50.zip |
Fix POSIX build in standalone shell mode
The conditional compilation to control standalone shell mode was
incorrect when building for POSIX. This hadn't been noticed before
as it had only been tested in the default configuration where
standalone shell mode is disabled.
Diffstat (limited to 'shell')
-rw-r--r-- | shell/ash.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/shell/ash.c b/shell/ash.c index e74662d8d..235eb8b7d 100644 --- a/shell/ash.c +++ b/shell/ash.c | |||
@@ -9106,7 +9106,7 @@ tryexec(IF_FEATURE_SH_STANDALONE(int applet_no,) const char *cmd, char **argv, c | |||
9106 | # else | 9106 | # else |
9107 | if (APPLET_IS_NOEXEC(applet_no)) { | 9107 | if (APPLET_IS_NOEXEC(applet_no)) { |
9108 | # endif | 9108 | # endif |
9109 | #if ENABLE_PLATFORM_MINGW32 && !defined(_UCRT) | 9109 | #if !ENABLE_PLATFORM_MINGW32 || !defined(_UCRT) |
9110 | /* If building for UCRT move this up into shellexec() to | 9110 | /* If building for UCRT move this up into shellexec() to |
9111 | * work around a bug. */ | 9111 | * work around a bug. */ |
9112 | clearenv(); | 9112 | clearenv(); |
@@ -9183,7 +9183,7 @@ static void shellexec(char *prog, char **argv, const char *path, int idx) | |||
9183 | int applet_no = -1; /* used only by FEATURE_SH_STANDALONE */ | 9183 | int applet_no = -1; /* used only by FEATURE_SH_STANDALONE */ |
9184 | 9184 | ||
9185 | envp = listvars(VEXPORT, VUNSET, /*strlist:*/ NULL, /*end:*/ NULL); | 9185 | envp = listvars(VEXPORT, VUNSET, /*strlist:*/ NULL, /*end:*/ NULL); |
9186 | #if ENABLE_PLATFORM_MINGW32 && defined(_UCRT) | 9186 | #if ENABLE_FEATURE_SH_STANDALONE && ENABLE_PLATFORM_MINGW32 && defined(_UCRT) |
9187 | /* Avoid UCRT bug by updating parent's environment and passing a | 9187 | /* Avoid UCRT bug by updating parent's environment and passing a |
9188 | * NULL environment pointer to execve(). */ | 9188 | * NULL environment pointer to execve(). */ |
9189 | clearenv(); | 9189 | clearenv(); |