diff options
author | Ron Yorston <rmy@pobox.com> | 2023-08-06 12:41:21 +0100 |
---|---|---|
committer | Ron Yorston <rmy@pobox.com> | 2023-08-06 12:41:21 +0100 |
commit | de317f125912fd5726708c24b99e3a3c879f6c1b (patch) | |
tree | e7b36d4d93e45bc326a9f27daefa1c0e5338cf9d /coreutils/nproc.c | |
parent | 0342f258f74bde329cc98733a3b22196ca1b1bdb (diff) | |
download | busybox-w32-de317f125912fd5726708c24b99e3a3c879f6c1b.tar.gz busybox-w32-de317f125912fd5726708c24b99e3a3c879f6c1b.tar.bz2 busybox-w32-de317f125912fd5726708c24b99e3a3c879f6c1b.zip |
nproc: fix build with long options disabled
Allow nproc to build without error when LONG_OPTS is disabled.
Diffstat (limited to 'coreutils/nproc.c')
-rw-r--r-- | coreutils/nproc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/coreutils/nproc.c b/coreutils/nproc.c index 5259921f1..7c91a286f 100644 --- a/coreutils/nproc.c +++ b/coreutils/nproc.c | |||
@@ -73,8 +73,8 @@ int nproc_main(int argc UNUSED_PARAM, char **argv UNUSED_PARAM) | |||
73 | #else /* ENABLE_PLATFORM_MINGW32 */ | 73 | #else /* ENABLE_PLATFORM_MINGW32 */ |
74 | if (GetProcessAffinityMask(GetCurrentProcess(), &process_affinity, | 74 | if (GetProcessAffinityMask(GetCurrentProcess(), &process_affinity, |
75 | &system_affinity)) { | 75 | &system_affinity)) { |
76 | affinity = (ENABLE_LONG_OPTS && opts & (1 << 1)) ? | 76 | affinity = IF_LONG_OPTS((opts & (1 << 1)) ? system_affinity :) |
77 | system_affinity : process_affinity; | 77 | process_affinity; |
78 | while (affinity) { | 78 | while (affinity) { |
79 | count += affinity & 1; | 79 | count += affinity & 1; |
80 | affinity >>= 1; | 80 | affinity >>= 1; |