]> granicus.if.org Git - nethack/commitdiff
refine detection by compiler version in tradstdc.h
authornhmall <nhmall@nethack.org>
Wed, 1 Feb 2023 14:55:41 +0000 (09:55 -0500)
committernhmall <nhmall@nethack.org>
Wed, 1 Feb 2023 14:55:41 +0000 (09:55 -0500)
include/tradstdc.h

index 02f4c4a57c19326616eb5f3f7974d9be915d2998..afbafe5844bc5ffe8e7796bfbee93f4242cd26f2 100644 (file)
@@ -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 */