kernel: remove linux 4.4 support
[openwrt/openwrt.git] / package / devel / perf / musl-compat.h
index d0fa7810fa8e95de825bae8ed63d00c1b9735128..83aa00a7c8f643668e55416a55779ec7be5166b3 100644 (file)
@@ -4,11 +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 _IOR
 #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)
@@ -51,21 +39,5 @@ static inline long sysconf_wrap(int name)
 
 #define sysconf(_n) sysconf_wrap(_n)
 
-static inline int compat_sched_getcpu(void)
-{
-#ifdef __NR_getcpu
-       unsigned int val;
-
-       if (syscall(__NR_getcpu, &val))
-               return -1;
-
-       return val;
-#else
-       return -1;
-#endif
-}
-
-#define sched_getcpu compat_sched_getcpu
-
 #endif
 #endif