summaryrefslogtreecommitdiff
path: root/tests/libc-config.h
diff options
context:
space:
mode:
Diffstat (limited to 'tests/libc-config.h')
-rw-r--r--tests/libc-config.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/libc-config.h b/tests/libc-config.h
index 70114608..33bdb736 100644
--- a/tests/libc-config.h
+++ b/tests/libc-config.h
@@ -48,6 +48,11 @@
/* From glibc <features.h>. */
+#if defined __clang__
+ /* clang really only groks GNU C 4.2, regardless of its value of __GNUC__. */
+# undef __GNUC_PREREQ
+# define __GNUC_PREREQ(maj, min) ((maj) < 4 + ((min) <= 2))
+#endif
#ifndef __GNUC_PREREQ
# if defined __GNUC__ && defined __GNUC_MINOR__
# define __GNUC_PREREQ(maj, min) ((maj) < __GNUC__ + ((min) <= __GNUC_MINOR__))