diff options
author | Felix Fietkau <nbd@openwrt.org> | 2016-01-12 16:42:12 +0000 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2016-01-12 16:42:12 +0000 |
commit | bd99318c820c47af63c30dcf12fb3f929c257180 (patch) | |
tree | 16ab41c3b8666e60eb63e3659bb17f5d467b0b24 /package/devel/perf/musl-include | |
parent | 2a170e40860034a9a5157306547c1a333be3845b (diff) | |
download | upstream-bd99318c820c47af63c30dcf12fb3f929c257180.tar.gz upstream-bd99318c820c47af63c30dcf12fb3f929c257180.tar.bz2 upstream-bd99318c820c47af63c30dcf12fb3f929c257180.zip |
perf: fix strerror_r override detection, apparently part of tools/ relies on non-GNU behavior
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
SVN-Revision: 48221
Diffstat (limited to 'package/devel/perf/musl-include')
-rw-r--r-- | package/devel/perf/musl-include/string.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/package/devel/perf/musl-include/string.h b/package/devel/perf/musl-include/string.h new file mode 100644 index 0000000000..65dc2f1e8f --- /dev/null +++ b/package/devel/perf/musl-include/string.h @@ -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 |