We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c6a907a commit 2c8b124Copy full SHA for 2c8b124
libcxx/include/__configuration/platform.h
@@ -32,12 +32,14 @@
32
33
// Need to detect which libc we're using if we're on Linux.
34
#if defined(__linux__) || defined(__AMDGPU__) || defined(__NVPTX__)
35
-# include <features.h>
36
-# if defined(__GLIBC_PREREQ)
37
-# define _LIBCPP_GLIBC_PREREQ(a, b) __GLIBC_PREREQ(a, b)
38
-# else
39
-# define _LIBCPP_GLIBC_PREREQ(a, b) 0
40
-# endif // defined(__GLIBC_PREREQ)
+# if __has_include(<features.h>)
+# include <features.h>
+# if defined(__GLIBC_PREREQ)
+# define _LIBCPP_GLIBC_PREREQ(a, b) __GLIBC_PREREQ(a, b)
+# else
+# define _LIBCPP_GLIBC_PREREQ(a, b) 0
41
+# endif // defined(__GLIBC_PREREQ)
42
+# endif
43
#endif
44
45
#ifndef __BYTE_ORDER__
0 commit comments