Skip to content

Commit fbc7e2c

Browse files
committed
[CoreFoundation] Don't assume we can use __GLIBC_PREREQ on Linux.
We might be using musl instead, which doesn't have __GLIBC_PREREQ as it isn't Glibc. rdar://123381867
1 parent 48076cb commit fbc7e2c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

CoreFoundation/Base.subproj/ForSwiftFoundationOnly.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@
6969
#include <features.h>
7070
#include <termios.h>
7171

72+
#ifdef __GLIBC_PREREQ
7273
#if __GLIBC_PREREQ(2, 28) == 0
7374
// required for statx() system call, glibc >=2.28 wraps the kernel function
7475
#include <sys/syscall.h>
@@ -78,7 +79,7 @@
7879
#include <linux/fs.h>
7980
#define AT_STATX_SYNC_AS_STAT 0x0000 /* - Do whatever stat() does */
8081
#endif //__GLIBC_PREREQ(2. 28)
81-
82+
#endif // defined(__GLIBC_PREREQ)
8283
#ifndef __NR_statx
8384
#include <sys/stat.h>
8485
#endif // not __NR_statx

0 commit comments

Comments
 (0)