Author: nbd Date: 2016-01-12 17:42:12 +0100 (Tue, 12 Jan 2016) New Revision: 48221
Added: trunk/package/devel/perf/musl-include/ trunk/package/devel/perf/musl-include/string.h Modified: trunk/package/devel/perf/Makefile trunk/package/devel/perf/musl-compat.h Log: perf: fix strerror_r override detection, apparently part of tools/ relies on non-GNU behavior Signed-off-by: Felix Fietkau <[email protected]> Modified: trunk/package/devel/perf/Makefile =================================================================== --- trunk/package/devel/perf/Makefile 2016-01-12 14:29:19 UTC (rev 48220) +++ trunk/package/devel/perf/Makefile 2016-01-12 16:42:12 UTC (rev 48221) @@ -59,7 +59,7 @@ prefix=/usr ifdef CONFIG_USE_MUSL - MAKE_FLAGS += EXTRA_CFLAGS="-include $(CURDIR)/musl-compat.h -D__UCLIBC__" + MAKE_FLAGS += EXTRA_CFLAGS="-I$(CURDIR)/musl-include -include $(CURDIR)/musl-compat.h -D__UCLIBC__" endif define Build/Compile Modified: trunk/package/devel/perf/musl-compat.h =================================================================== --- trunk/package/devel/perf/musl-compat.h 2016-01-12 14:29:19 UTC (rev 48220) +++ trunk/package/devel/perf/musl-compat.h 2016-01-12 16:42:12 UTC (rev 48221) @@ -4,7 +4,6 @@ #ifndef __ASSEMBLER__ #include <sys/ioctl.h> -#include <string.h> #include <unistd.h> #include <stdio.h> #include <syscall.h> @@ -16,16 +15,6 @@ #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) Added: trunk/package/devel/perf/musl-include/string.h =================================================================== --- trunk/package/devel/perf/musl-include/string.h (rev 0) +++ trunk/package/devel/perf/musl-include/string.h 2016-01-12 16:42:12 UTC (rev 48221) @@ -0,0 +1,18 @@ +#ifndef __MUSL_COMPAT_STRING_H +#define __MUSL_COMPAT_STRING_H + +#include_next <string.h> + +/* 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; +} +#ifdef _GNU_SOURCE +#define strerror_r gnu_strerror_r +#endif + +#endif _______________________________________________ openwrt-commits mailing list [email protected] https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-commits
