From: John David Anglin Date: Wed, 6 Jan 2021 13:58:56 +0000 (+0000) Subject: Fix libcody build on hppa*-*-hpux11.11. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=6d0b075d662e277a9847f7e8c17d34e7866f0cec;p=gcc.git Fix libcody build on hppa*-*-hpux11.11. 2021-01-06 John David Anglin libcody/ChangeLog: PR bootstrap/98506 * resolver.cc: Only use fstatat when _POSIX_C_SOURCE >= 200809L. --- diff --git a/libcody/resolver.cc b/libcody/resolver.cc index 7e9defb4eca..034fd63b9a8 100644 --- a/libcody/resolver.cc +++ b/libcody/resolver.cc @@ -10,7 +10,9 @@ #include #include -#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))