build Mesa with _ISOC11_SOURCE for c11 visibility

autoconf function tests run without --std and have c11 visibility
timespec_get(3), a c11 function is found this way.

With gcc < 4.6 Mesa will build with --std=gnu99 with clang it will
build with --std=c99 and timespec_get() will no longer be visibile.
Further complicating things gcc 4.2 does not recognise --std=c11.

This was not noticed on linux as they build with _GNU_SOURCE which
among other things gives c11 visibility even with --std=c99.

discussed with millert@
This commit is contained in:
jsg 2019-12-07 03:09:41 +00:00
parent ed32a4544c
commit d3074235e2

View File

@ -315,6 +315,9 @@ linux*|*-gnu*|gnu*|cygwin*)
solaris*) solaris*)
DEFINES="$DEFINES -DSVR4" DEFINES="$DEFINES -DSVR4"
;; ;;
openbsd*)
DEFINES="$DEFINES -D_ISOC11_SOURCE"
;;
esac esac
AM_CONDITIONAL(HAVE_ANDROID, test "x$android" = xyes) AM_CONDITIONAL(HAVE_ANDROID, test "x$android" = xyes)