Author: nbd
Date: 2016-01-12 12:15:34 +0100 (Tue, 12 Jan 2016)
New Revision: 48218

Modified:
   trunk/package/devel/perf/musl-compat.h
Log:
perf: fix build errors on x86 and other platforms

Signed-off-by: Felix Fietkau <[email protected]>

Modified: trunk/package/devel/perf/musl-compat.h
===================================================================
--- trunk/package/devel/perf/musl-compat.h      2016-01-12 10:08:18 UTC (rev 
48217)
+++ trunk/package/devel/perf/musl-compat.h      2016-01-12 11:15:34 UTC (rev 
48218)
@@ -1,6 +1,8 @@
 #ifndef __PERF_MUSL_COMPAT_H
 #define __PERF_MUSL_COMPAT_H
 
+#ifndef __ASSEMBLER__
+
 #include <sys/ioctl.h>
 #include <string.h>
 #include <unistd.h>
@@ -15,8 +17,14 @@
 #undef _IO
 
 /* Change XSI compliant version into GNU extension hackery */
-#define strerror_r(err, buf, buflen) \
-       (strerror_r(err, buf, buflen) ? NULL : buf)
+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
 
@@ -60,3 +68,4 @@
 #define sched_getcpu compat_sched_getcpu
 
 #endif
+#endif
_______________________________________________
openwrt-commits mailing list
[email protected]
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-commits

Reply via email to