perf: include asm/unistd.h instead of syscall.h to fix conflict with kernel headers
[openwrt-github/.git] / package / devel / perf / musl-compat.h
index d0fa7810fa8e95de825bae8ed63d00c1b9735128..8ce97bea88091f69c2105745c778509502b927a0 100644 (file)
@@ -4,10 +4,9 @@
 #ifndef __ASSEMBLER__
 
 #include <sys/ioctl.h>
-#include <string.h>
+#include <asm/unistd.h>
 #include <unistd.h>
 #include <stdio.h>
-#include <syscall.h>
 #include <sched.h>
 
 #undef _IOWR
 #undef _IOC
 #undef _IO
 
-/* Change XSI compliant version into GNU extension hackery */
-static inline char *
-gnu_strerror_r(int err, char *buf, size_t buflen)
-{
-       if (strerror_r(err, buf, buflen))
-               return NULL;
-       return buf;
-}
-#define strerror_r gnu_strerror_r
-
 #define _SC_LEVEL1_DCACHE_LINESIZE -1
 
 static inline long sysconf_wrap(int name)