2021-01-06 John David Anglin <danglin@gcc.gnu.org>
libcody/ChangeLog:
PR bootstrap/98506
* resolver.cc: Only use fstatat when _POSIX_C_SOURCE >= 200809L.
#include <sys/stat.h>
#include <sys/types.h>
-#if (defined (__unix__) \
+#if ((defined (__unix__) \
+ && defined _POSIX_C_SOURCE \
+ && (_POSIX_C_SOURCE - 0) >= 200809L) \
|| (defined (__Apple__) \
&& defined (__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) \
&& __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 101000))