OSDN Git Service

add strerror_r symbol alias as some autotool based packages simply use AC_CHECK_LIB...
authorMike Frysinger <vapier@gentoo.org>
Sat, 15 Sep 2007 00:52:56 +0000 (00:52 -0000)
committerMike Frysinger <vapier@gentoo.org>
Sat, 15 Sep 2007 00:52:56 +0000 (00:52 -0000)
libc/string/__xpg_strerror_r.c

index c5096a6..f072372 100644 (file)
@@ -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)