Skip to content

Commit

Permalink
Add option to disable spawnv define (#301)
Browse files Browse the repository at this point in the history
  • Loading branch information
JorisGoosen authored Sep 21, 2023
1 parent 718d491 commit 4926250
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -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 <windows.h>
#If we are in UCRT we do not want to set the spawnv define because it breaks the build
IS_UCRT=`echo '#include <windows.h>'| 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])
Expand Down

0 comments on commit 4926250

Please sign in to comment.