diff --git a/configure.ac b/configure.ac index 7855bd9..6cc35c6 100644 --- a/configure.ac +++ b/configure.ac @@ -60,7 +60,15 @@ AS_CASE([$host], AC_SUBST([EXTRA_LDFLAGS]) AS_CASE([$host], - [*mingw*], [CFLAGS="$CFLAGS -D_spawnv=spawnv"], + [*mingw*], + [ + #There is no real way to determine whether UCRT is used vs normal MINGW but one way is by checking a define in + #If we are in UCRT we do not want to set the spawnv define because it breaks the build + IS_UCRT=`echo '#include '| gcc -E -dM - | grep -i _UCRT | xargs` + AS_IF([test "$IS_UCRT" == ""], [ + CFLAGS="$CFLAGS -D_spawnv=spawnv" + ]) + ], [CFLAGS="$CFLAGS"]) AC_ARG_VAR([LIB_FUZZING_ENGINE], [Location of prebuilt fuzzing engine library])