[git commit] no need for hidden inet_ntoa_r
Bernhard Reutner-Fischer
rep.dot.nop at gmail.com
Fri Jun 15 12:00:21 UTC 2012
commit: http://git.uclibc.org/uClibc/commit/?id=b9e58bace839d8a992ef4937b446f88b47a3e8bc
branch: http://git.uclibc.org/uClibc/commit/?id=refs/heads/master
it is reused within the same file, solve it through a static function
Signed-off-by: Peter S. Mazinger <ps.m at gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop at gmail.com>
---
include/arpa/inet.h | 1 -
libc/inet/addr.c | 6 +++---
2 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/include/arpa/inet.h b/include/arpa/inet.h
index fbd715a..405595f 100644
--- a/include/arpa/inet.h
+++ b/include/arpa/inet.h
@@ -60,7 +60,6 @@ libc_hidden_proto(inet_ntoa)
#ifdef __UCLIBC__
/* Recursion-safe flavor */
extern char *inet_ntoa_r (struct in_addr __in, char *__buf) __THROW;
-libc_hidden_proto(inet_ntoa_r)
#endif
/* Convert from presentation format of an Internet number in buffer
diff --git a/libc/inet/addr.c b/libc/inet/addr.c
index c71d4d4..8ae8576 100644
--- a/libc/inet/addr.c
+++ b/libc/inet/addr.c
@@ -114,7 +114,7 @@ libc_hidden_def(inet_addr)
#define INET_NTOA_MAX_LEN 16 /* max 12 digits + 3 '.'s + 1 nul */
-char *inet_ntoa_r(struct in_addr in, char buf[INET_NTOA_MAX_LEN])
+static char *__inet_ntoa_r(struct in_addr in, char buf[INET_NTOA_MAX_LEN])
{
in_addr_t addr = ntohl(in.s_addr);
int i;
@@ -133,12 +133,12 @@ char *inet_ntoa_r(struct in_addr in, char buf[INET_NTOA_MAX_LEN])
return p+1;
}
-libc_hidden_def(inet_ntoa_r)
+strong_alias(__inet_ntoa_r,inet_ntoa_r)
char *inet_ntoa(struct in_addr in)
{
static char buf[INET_NTOA_MAX_LEN];
- return inet_ntoa_r(in, buf);
+ return __inet_ntoa_r(in, buf);
}
libc_hidden_def(inet_ntoa)
#endif
More information about the uClibc-cvs
mailing list