From 8e970802761c593e2ed556722276ea036c4ad031 Mon Sep 17 00:00:00 2001 From: Anthony Ramine Date: Tue, 15 Oct 2013 10:44:19 +0200 Subject: Conditionally compile my_gethostbyname_r and my_gethostbyaddr_r These are not needed when not on VXWORKS or without _REENTRANT. connect/ei_resolve.c:302:24: warning: unused function 'my_gethostbyname_r' [-Wunused-function] static struct hostent *my_gethostbyname_r(const char *name, ^ connect/ei_resolve.c:360:24: warning: unused function 'my_gethostbyaddr_r' [-Wunused-function] static struct hostent *my_gethostbyaddr_r(const char *addr, ^ --- lib/erl_interface/src/connect/ei_resolve.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'lib/erl_interface') diff --git a/lib/erl_interface/src/connect/ei_resolve.c b/lib/erl_interface/src/connect/ei_resolve.c index 494dba072c..74dcba61a7 100644 --- a/lib/erl_interface/src/connect/ei_resolve.c +++ b/lib/erl_interface/src/connect/ei_resolve.c @@ -173,6 +173,8 @@ static int verify_dns_configuration(void) #endif +#if defined(VXWORKS) || _REENTRANT + /* * Copy the contents of one struct hostent to another, i.e. don't just * copy the pointers, copy all the data and create new pointers, etc. @@ -357,6 +359,10 @@ static struct hostent *my_gethostbyname_r(const char *name, return rval; } +#endif /* defined(VXWORKS) || _REENTRANT */ + +#if defined(VXWORKS) || EI_THREADS != false + static struct hostent *my_gethostbyaddr_r(const char *addr, int length, int type, @@ -418,6 +424,7 @@ static struct hostent *my_gethostbyaddr_r(const char *addr, return rval; } +#endif /* defined(VXWORKS) || EI_THREADS != false */ #endif /* !HAVE_GETHOSTBYNAME_R */ -- cgit v1.2.3