Skip to content

Commit ca57cc2

Browse files
committed
fix test for old glibc
1 parent 850f74f commit ca57cc2

File tree

1 file changed

+8
-0
lines changed
  • compiler-rt/test/sanitizer_common/TestCases/Linux

1 file changed

+8
-0
lines changed

compiler-rt/test/sanitizer_common/TestCases/Linux/preadv2.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,14 @@
77
#include <sys/uio.h>
88
#include <unistd.h>
99

10+
#if !defined(__GLIBC_PREREQ)
11+
#define __GLIBC_PREREQ(a, b) 0
12+
#endif
13+
14+
#if !__GLIBC_PREREQ(2, 26)
15+
#define preadv2(a, b, c, d, e) preadv(a, b, c, d)
16+
#endif
17+
1018
int main(void) {
1119
int fd = open("/proc/self/stat", O_RDONLY);
1220
char bufa[7];

0 commit comments

Comments
 (0)