Skip to content

Commit 219c923

Browse files
committed
Address comments
1 parent abbae3a commit 219c923

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

libcxx/include/__configuration/platform.h

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,16 +30,17 @@
3030
// ... add new file formats here ...
3131
#endif
3232

33-
// Need to detect which libc we're using if we're on Linux.
34-
#if defined(__linux__)
33+
// To detect which libc we're using
34+
#if __has_include(<features.h>)
3535
# include <features.h>
36+
#endif
37+
38+
#if defined(__linux__)
3639
# if defined(__GLIBC_PREREQ)
3740
# define _LIBCPP_GLIBC_PREREQ(a, b) __GLIBC_PREREQ(a, b)
3841
# else
3942
# define _LIBCPP_GLIBC_PREREQ(a, b) 0
4043
# endif // defined(__GLIBC_PREREQ)
41-
#elif defined(__AMDGPU__) || defined(__NVPTX__)
42-
# include <features.h>
4344
#endif
4445

4546
#ifndef __BYTE_ORDER__

0 commit comments

Comments
 (0)