From 6d0b075d662e277a9847f7e8c17d34e7866f0cec Mon Sep 17 00:00:00 2001 From: John David Anglin Date: Wed, 6 Jan 2021 13:58:56 +0000 Subject: [PATCH] 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. --- libcody/resolver.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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)) -- 2.30.2