summaryrefslogtreecommitdiff
path: root/libc
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2007-09-15 00:52:56 +0000
committerMike Frysinger <vapier@gentoo.org>2007-09-15 00:52:56 +0000
commit7a4e15c50525db56efe67d23b36e955ca21c3a8c (patch)
treee1a4d955e4a6e4a46ca63917310bbcd5d1c05f1f /libc
parent42c4166f31d511739df591a21311fc973a852442 (diff)
add strerror_r symbol alias as some autotool based packages simply use AC_CHECK_LIB() to see if a function exists rather than checking the headers
Diffstat (limited to 'libc')
-rw-r--r--libc/string/__xpg_strerror_r.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/libc/string/__xpg_strerror_r.c b/libc/string/__xpg_strerror_r.c
index c5096a6f7..f07237287 100644
--- a/libc/string/__xpg_strerror_r.c
+++ b/libc/string/__xpg_strerror_r.c
@@ -5,11 +5,16 @@
* Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
*/
+/* Make sure we get proper strerror_r() prototype */
+#define strerror_r __moo
+
#include <features.h>
#include <errno.h>
#include <string.h>
#include "_syserrmsg.h"
+#undef strerror_r
+
libc_hidden_proto(__xpg_strerror_r)
libc_hidden_proto(memcpy)
libc_hidden_proto(strlen)
@@ -271,3 +276,4 @@ int __xpg_strerror_r(int errnum, char *strerrbuf, size_t buflen)
#endif /* __UCLIBC_HAS_ERRNO_MESSAGES__ */
libc_hidden_def(__xpg_strerror_r)
+weak_alias(__xpg_strerror_r, strerror_r)