summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2001-07-06 17:51:29 +0000
committerEric Andersen <andersen@codepoet.org>2001-07-06 17:51:29 +0000
commit77b68e6f42645d83ebade4842f9346948b555b16 (patch)
treec1689ef8f4d0b50a1c7bbae4431b25bd1e6c8398
parent3102ac4b582b144ad0e04c7cbe511c25c1175ee2 (diff)
downloadbusybox-w32-77b68e6f42645d83ebade4842f9346948b555b16.tar.gz
busybox-w32-77b68e6f42645d83ebade4842f9346948b555b16.tar.bz2
busybox-w32-77b68e6f42645d83ebade4842f9346948b555b16.zip
Add woukaround for missing struct _res in uClibc
-rw-r--r--networking/nslookup.c11
-rw-r--r--nslookup.c11
2 files changed, 20 insertions, 2 deletions
diff --git a/networking/nslookup.c b/networking/nslookup.c
index 1c75bb570..9b7cb645c 100644
--- a/networking/nslookup.c
+++ b/networking/nslookup.c
@@ -128,6 +128,14 @@ static struct hostent *gethostbyaddr_wrapper(const char *address)
128 return gethostbyaddr((char *) &addr, 4, AF_INET); /* IPv4 only for now */ 128 return gethostbyaddr((char *) &addr, 4, AF_INET); /* IPv4 only for now */
129} 129}
130 130
131#ifdef __UCLIBC__
132#warning FIXME after fixing uClibc to define struct _res
133static inline void server_print(void)
134{
135 printf("Server: %s\n", "default");
136 printf("Address: %s\n\n", "default");
137}
138#else
131/* lookup the default nameserver and display it */ 139/* lookup the default nameserver and display it */
132static inline void server_print(void) 140static inline void server_print(void)
133{ 141{
@@ -137,6 +145,7 @@ static inline void server_print(void)
137 hostent_fprint(gethostbyaddr_wrapper(ip)); 145 hostent_fprint(gethostbyaddr_wrapper(ip));
138 printf("\n"); 146 printf("\n");
139} 147}
148#endif
140 149
141/* naive function to check whether char *s is an ip address */ 150/* naive function to check whether char *s is an ip address */
142static int is_ip_address(const char *s) 151static int is_ip_address(const char *s)
@@ -171,4 +180,4 @@ int nslookup_main(int argc, char **argv)
171 return EXIT_SUCCESS; 180 return EXIT_SUCCESS;
172} 181}
173 182
174/* $Id: nslookup.c,v 1.23 2001/06/12 22:21:24 andersen Exp $ */ 183/* $Id: nslookup.c,v 1.24 2001/07/06 17:51:29 andersen Exp $ */
diff --git a/nslookup.c b/nslookup.c
index 1c75bb570..9b7cb645c 100644
--- a/nslookup.c
+++ b/nslookup.c
@@ -128,6 +128,14 @@ static struct hostent *gethostbyaddr_wrapper(const char *address)
128 return gethostbyaddr((char *) &addr, 4, AF_INET); /* IPv4 only for now */ 128 return gethostbyaddr((char *) &addr, 4, AF_INET); /* IPv4 only for now */
129} 129}
130 130
131#ifdef __UCLIBC__
132#warning FIXME after fixing uClibc to define struct _res
133static inline void server_print(void)
134{
135 printf("Server: %s\n", "default");
136 printf("Address: %s\n\n", "default");
137}
138#else
131/* lookup the default nameserver and display it */ 139/* lookup the default nameserver and display it */
132static inline void server_print(void) 140static inline void server_print(void)
133{ 141{
@@ -137,6 +145,7 @@ static inline void server_print(void)
137 hostent_fprint(gethostbyaddr_wrapper(ip)); 145 hostent_fprint(gethostbyaddr_wrapper(ip));
138 printf("\n"); 146 printf("\n");
139} 147}
148#endif
140 149
141/* naive function to check whether char *s is an ip address */ 150/* naive function to check whether char *s is an ip address */
142static int is_ip_address(const char *s) 151static int is_ip_address(const char *s)
@@ -171,4 +180,4 @@ int nslookup_main(int argc, char **argv)
171 return EXIT_SUCCESS; 180 return EXIT_SUCCESS;
172} 181}
173 182
174/* $Id: nslookup.c,v 1.23 2001/06/12 22:21:24 andersen Exp $ */ 183/* $Id: nslookup.c,v 1.24 2001/07/06 17:51:29 andersen Exp $ */