diff options
author | Anthony Ramine <[email protected]> | 2013-10-15 10:44:19 +0200 |
---|---|---|
committer | Henrik Nord <[email protected]> | 2013-12-02 15:20:50 +0100 |
commit | 8e970802761c593e2ed556722276ea036c4ad031 (patch) | |
tree | 8281d4c9c2972693052195adaf2271a397889a7c | |
parent | 012e6ee060c5b2c3933fb3ca8058ab63bac30962 (diff) | |
download | otp-8e970802761c593e2ed556722276ea036c4ad031.tar.gz otp-8e970802761c593e2ed556722276ea036c4ad031.tar.bz2 otp-8e970802761c593e2ed556722276ea036c4ad031.zip |
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,
^
-rw-r--r-- | lib/erl_interface/src/connect/ei_resolve.c | 7 |
1 files changed, 7 insertions, 0 deletions
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 */ |