diff options
author | Ron Yorston <rmy@pobox.com> | 2021-08-10 09:13:02 +0100 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2021-08-15 18:26:56 +0200 |
commit | 98cb561b5fd61fe37126fce7d557d5280c762b59 (patch) | |
tree | 89c3e25b43a31ed059a524c427d5529f54dd9a80 /coreutils | |
parent | 8ae6a4344d5d0f46e542d835ce4d218ff902c783 (diff) | |
download | busybox-w32-98cb561b5fd61fe37126fce7d557d5280c762b59.tar.gz busybox-w32-98cb561b5fd61fe37126fce7d557d5280c762b59.tar.bz2 busybox-w32-98cb561b5fd61fe37126fce7d557d5280c762b59.zip |
cp: fix build failure with long options disabled
When long options were disabled cp failed to compile with:
coreutils/cp.c:130:9: error: empty enum is invalid
130 | };
| ^
Rearrange the conditional compilation to suit.
Signed-off-by: Ron Yorston <rmy@pobox.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'coreutils')
-rw-r--r-- | coreutils/cp.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/coreutils/cp.c b/coreutils/cp.c index 50ca1ccea..ee40af50b 100644 --- a/coreutils/cp.c +++ b/coreutils/cp.c | |||
@@ -121,14 +121,12 @@ int cp_main(int argc, char **argv) | |||
121 | int d_flags; | 121 | int d_flags; |
122 | int flags; | 122 | int flags; |
123 | int status; | 123 | int status; |
124 | enum { | ||
125 | #if ENABLE_FEATURE_CP_LONG_OPTIONS | 124 | #if ENABLE_FEATURE_CP_LONG_OPTIONS |
125 | enum { | ||
126 | /*OPT_rmdest = FILEUTILS_RMDEST = 1 << FILEUTILS_CP_OPTBITS */ | 126 | /*OPT_rmdest = FILEUTILS_RMDEST = 1 << FILEUTILS_CP_OPTBITS */ |
127 | OPT_parents = 1 << (FILEUTILS_CP_OPTBITS+1), | 127 | OPT_parents = 1 << (FILEUTILS_CP_OPTBITS+1), |
128 | OPT_reflink = 1 << (FILEUTILS_CP_OPTBITS+2), | 128 | OPT_reflink = 1 << (FILEUTILS_CP_OPTBITS+2), |
129 | #endif | ||
130 | }; | 129 | }; |
131 | #if ENABLE_FEATURE_CP_LONG_OPTIONS | ||
132 | # if ENABLE_FEATURE_CP_REFLINK | 130 | # if ENABLE_FEATURE_CP_REFLINK |
133 | char *reflink = NULL; | 131 | char *reflink = NULL; |
134 | # endif | 132 | # endif |