Commit 2ac27056 authored by Federico G. Schwindt's avatar Federico G. Schwindt

Fix compilation on macOS Big Sur

Fixes:

In file included from vev.c:36:
 /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/pthread.h:328:6: error: macro expansion producing 'defined' has undefined behavior [-Werror,-Wexpansion-to-defined]
 #if !_PTHREAD_SWIFT_IMPORTER_NULLABILITY_COMPAT
      ^
 /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/pthread.h:197:2: note: expanded from macro '_PTHREAD_SWIFT_IMPORTER_NULLABILITY_COMPAT'
         defined(SWIFT_CLASS_EXTRA) && (!defined(SWIFT_SDK_OVERLAY_PTHREAD_EPOCH) || (SWIFT_SDK_OVERLAY_PTHREAD_EPOCH < 1))
parent 752949d7
......@@ -710,6 +710,14 @@ else
OCFLAGS="${OCFLAGS} -Werror"])
fi
case $target in
*-*-darwin*)
AX_CHECK_COMPILE_FLAG([-Wno-expansion-to-defined],
[CFLAGS="${CFLAGS} -Wno-expansion-to-defined"
OCFLAGS="${OCFLAGS} -Wno-expansion-to-defined"])
;;
esac
AX_CHECK_COMPILE_FLAG([-Werror=unused-result],
[CFLAGS="${CFLAGS} -Wno-error=unused-result"
OCFLAGS="${OCFLAGS} -Wno-error=unused-result"],
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment