diff options
author | Ron Yorston <rmy@pobox.com> | 2023-03-26 11:20:46 +0100 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2023-03-29 16:45:13 +0200 |
commit | 470fa7b3648da2ea120d65fa7cde69cad0421353 (patch) | |
tree | 74136f7a9db3f21eb83ace567ca4cca8ea3336be | |
parent | f2e659415ad59906124fca963040c8884746feed (diff) | |
download | busybox-w32-470fa7b3648da2ea120d65fa7cde69cad0421353.tar.gz busybox-w32-470fa7b3648da2ea120d65fa7cde69cad0421353.tar.bz2 busybox-w32-470fa7b3648da2ea120d65fa7cde69cad0421353.zip |
ash: make EPOCH variables work if RANDOM is disabled
Commit 1d37186fe2 (ash: add bash-compatible EPOCH variables) added
support for the EPOCHSECONDS and EPOCHREALTIME variables.
These variables are dynamic and therefore require the VDYNAMIC flag
to be non-zero. However, this is only the case if support for the
RANDOM variable is enabled.
Give VDYNAMIC a non-zero value if either EPOCH variables or RANDOM
are enabled.
Signed-off-by: Ron Yorston <rmy@pobox.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r-- | shell/ash.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/shell/ash.c b/shell/ash.c index 5f8c8ea19..559566b58 100644 --- a/shell/ash.c +++ b/shell/ash.c | |||
@@ -2087,7 +2087,7 @@ struct localvar { | |||
2087 | #define VNOFUNC 0x40 /* don't call the callback function */ | 2087 | #define VNOFUNC 0x40 /* don't call the callback function */ |
2088 | #define VNOSET 0x80 /* do not set variable - just readonly test */ | 2088 | #define VNOSET 0x80 /* do not set variable - just readonly test */ |
2089 | #define VNOSAVE 0x100 /* when text is on the heap before setvareq */ | 2089 | #define VNOSAVE 0x100 /* when text is on the heap before setvareq */ |
2090 | #if ENABLE_ASH_RANDOM_SUPPORT | 2090 | #if ENABLE_ASH_RANDOM_SUPPORT || BASH_EPOCH_VARS |
2091 | # define VDYNAMIC 0x200 /* dynamic variable */ | 2091 | # define VDYNAMIC 0x200 /* dynamic variable */ |
2092 | #else | 2092 | #else |
2093 | # define VDYNAMIC 0 | 2093 | # define VDYNAMIC 0 |