[git commit nptl] ether_line: fix build for socket && !ip

Bernhard Reutner-Fischer rep.dot.nop at gmail.com
Thu Jan 21 10:31:33 UTC 2010


commit: http://git.uclibc.org/uClibc/commit/?id=42303a2fc71e095e4e2c4f9caa87e05bb266c334
branch: http://git.uclibc.org/uClibc/commit/?id=refs/heads/nptl

The internal __ether_line helper needs ether_ntoa_r()

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop at gmail.com>
(cherry picked from commit 81264e8097b705f3b2a7e29be0a1a2ea853230cb)

Signed-off-by: Carmelo Amoroso <carmelo.amoroso at st.com>
---
 include/netinet/ether.h |    7 +++----
 libc/inet/Makefile.in   |    4 ++--
 2 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/include/netinet/ether.h b/include/netinet/ether.h
index c850e3e..2e52679 100644
--- a/include/netinet/ether.h
+++ b/include/netinet/ether.h
@@ -31,7 +31,8 @@
 
 __BEGIN_DECLS
 
-#if defined __UCLIBC_HAS_IPV4__ || defined __UCLIBC_HAS_IPV6__
+#if defined __UCLIBC_HAS_SOCKET__ || defined __UCLIBC_HAS_IPV4__ || \
+	defined __UCLIBC_HAS_IPV6__
 /* Convert 48 bit Ethernet ADDRess to ASCII.  */
 extern char *ether_ntoa (__const struct ether_addr *__addr) __THROW;
 extern char *ether_ntoa_r (__const struct ether_addr *__addr, char *__buf)
@@ -43,10 +44,8 @@ extern struct ether_addr *ether_aton (__const char *__asc) __THROW;
 extern struct ether_addr *ether_aton_r (__const char *__asc,
 					struct ether_addr *__addr) __THROW;
 libc_hidden_proto(ether_aton_r)
-#endif
 
-#if defined __UCLIBC_HAS_SOCKET__ || defined __UCLIBC_HAS_IPV4__ || \
-	defined __UCLIBC_HAS_IPV6__
+
 /* Map 48 bit Ethernet number ADDR to HOSTNAME.  */
 extern int ether_ntohost (char *__hostname, __const struct ether_addr *__addr)
      __THROW;
diff --git a/libc/inet/Makefile.in b/libc/inet/Makefile.in
index 23e8732..8131945 100644
--- a/libc/inet/Makefile.in
+++ b/libc/inet/Makefile.in
@@ -20,7 +20,7 @@ endif
 ifneq ($(UCLIBC_HAS_IPV4)$(UCLIBC_HAS_IPV6),)
 CSRC +=	getservice.c getproto.c hostid.c getnetent.c getnetbynm.c getnetbyad.c \
 	inet_net.c herror.c if_index.c gai_strerror.c getaddrinfo.c \
-	ether_addr.c ifaddrs.c ntop.c
+	ifaddrs.c ntop.c
 endif
 ifeq ($(UCLIBC_HAS_IPV6),y)
 CSRC += in6_addr.c
@@ -62,7 +62,7 @@ CSRC += $(socketcalls_CSRC) opensock.c
 endif
 
 ifneq ($(UCLIBC_HAS_SOCKET)$(UCLIBC_HAS_IPV4)$(UCLIBC_HAS_IPV6),)
-CSRC += ethers.c
+CSRC += ethers.c ether_addr.c
 endif
 
 INET_SRC := $(patsubst %.c,$(INET_DIR)/%.c,$(CSRC))
-- 
1.6.3.3



More information about the uClibc-cvs mailing list