aboutsummaryrefslogtreecommitdiff
path: root/libcody
diff options
context:
space:
mode:
authorJohn David Anglin <danglin@gcc.gnu.org>2021-01-06 13:58:56 +0000
committerJohn David Anglin <danglin@gcc.gnu.org>2021-01-06 13:58:56 +0000
commit6d0b075d662e277a9847f7e8c17d34e7866f0cec (patch)
treee71c50c516ffe6af88bb884eaa8e8954220031c6 /libcody
parent758abf1ae3139a5e3d556fd2cc5636c813629547 (diff)
downloadgcc-6d0b075d662e277a9847f7e8c17d34e7866f0cec.zip
gcc-6d0b075d662e277a9847f7e8c17d34e7866f0cec.tar.gz
gcc-6d0b075d662e277a9847f7e8c17d34e7866f0cec.tar.bz2
Fix libcody build on hppa*-*-hpux11.11.
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.
Diffstat (limited to 'libcody')
-rw-r--r--libcody/resolver.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/libcody/resolver.cc b/libcody/resolver.cc
index 7e9defb..034fd63 100644
--- a/libcody/resolver.cc
+++ b/libcody/resolver.cc
@@ -10,7 +10,9 @@
#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))