Skip to content
Snippets Groups Projects
Commit 10e6d3ad authored by Felix Fietkau's avatar Felix Fietkau
Browse files

perf: fix build errors on x86 and other platforms


Signed-off-by: default avatarFelix Fietkau <nbd@openwrt.org>

SVN-Revision: 48218
parent a68d8a66
No related branches found
No related tags found
No related merge requests found
#ifndef __PERF_MUSL_COMPAT_H #ifndef __PERF_MUSL_COMPAT_H
#define __PERF_MUSL_COMPAT_H #define __PERF_MUSL_COMPAT_H
#ifndef __ASSEMBLER__
#include <sys/ioctl.h> #include <sys/ioctl.h>
#include <string.h> #include <string.h>
#include <unistd.h> #include <unistd.h>
...@@ -15,8 +17,14 @@ ...@@ -15,8 +17,14 @@
#undef _IO #undef _IO
/* Change XSI compliant version into GNU extension hackery */ /* Change XSI compliant version into GNU extension hackery */
#define strerror_r(err, buf, buflen) \ static inline char *
(strerror_r(err, buf, buflen) ? NULL : buf) 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 #define _SC_LEVEL1_DCACHE_LINESIZE -1
...@@ -60,3 +68,4 @@ static inline int compat_sched_getcpu(void) ...@@ -60,3 +68,4 @@ static inline int compat_sched_getcpu(void)
#define sched_getcpu compat_sched_getcpu #define sched_getcpu compat_sched_getcpu
#endif #endif
#endif
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment