From 0e8bc6527c9d4b9af17e9b0f759b1ad12ae1bc35 Mon Sep 17 00:00:00 2001 From: Ron Yorston Date: Tue, 31 Dec 2024 08:21:12 +0000 Subject: win32: fix compilation with FEATURE_SH_NOFORK disabled Compiling with FEATURE_SH_NOFORK disabled resulted in an error and a warning. Fixing these doesn't change the default build. --- findutils/xargs.c | 6 +++--- win32/process.c | 2 ++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/findutils/xargs.c b/findutils/xargs.c index f0abf1a23..83af75521 100644 --- a/findutils/xargs.c +++ b/findutils/xargs.c @@ -846,11 +846,11 @@ int xargs_main(int argc UNUSED_PARAM, char **argv) * arguments, but not if the command is a NOFORK applet. If the rules * to detect this situation change xargs_exec() above will also need * to be updated. */ -# if ENABLE_FEATURE_XARGS_SUPPORT_PARALLEL +# if ENABLE_FEATURE_PREFER_APPLETS && (NUM_APPLETS > 1) +# if ENABLE_FEATURE_XARGS_SUPPORT_PARALLEL if (G.max_procs == 1) -# endif +# endif { -# if ENABLE_FEATURE_PREFER_APPLETS && (NUM_APPLETS > 1) int applet = find_applet_by_name(argv[0]); if (applet >= 0 && APPLET_IS_NOFORK(applet)) { quote = FALSE; diff --git a/win32/process.c b/win32/process.c index e7c9ca187..fd89707ca 100644 --- a/win32/process.c +++ b/win32/process.c @@ -331,7 +331,9 @@ mingw_spawn_interpreter(int mode, const char *prog, char *const *argv, } else { errno = ENOENT; } +#if ENABLE_FEATURE_PREFER_APPLETS && NUM_APPLETS > 1 done: +#endif free(path); free(new_argv); return ret; -- cgit v1.2.3-55-g6feb