From: nhmall Date: Wed, 1 Feb 2023 14:55:41 +0000 (-0500) Subject: refine detection by compiler version in tradstdc.h X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d90fa596a309f32c87368a54a843c021ba3cf641;p=nethack refine detection by compiler version in tradstdc.h --- diff --git a/include/tradstdc.h b/include/tradstdc.h index 02f4c4a57..afbafe584 100644 --- a/include/tradstdc.h +++ b/include/tradstdc.h @@ -472,9 +472,11 @@ inline char *rindex(const char *s, int c) __attribute__ ((unavailable)); #endif #endif #if defined(__clang__) +#if __clang_major__ >= 7 inline char *index(const char *s, int c) __attribute__ ((unavailable)); inline char *rindex(const char *s, int c) __attribute__ ((unavailable)); #endif +#endif #endif /* TRADSTDC_H */