aboutsummaryrefslogtreecommitdiffstats
path: root/lib/erl_interface/src
diff options
context:
space:
mode:
authorAnthony Ramine <[email protected]>2013-10-15 10:44:19 +0200
committerHenrik Nord <[email protected]>2013-12-02 15:20:50 +0100
commit8e970802761c593e2ed556722276ea036c4ad031 (patch)
tree8281d4c9c2972693052195adaf2271a397889a7c /lib/erl_interface/src
parent012e6ee060c5b2c3933fb3ca8058ab63bac30962 (diff)
downloadotp-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, ^
Diffstat (limited to 'lib/erl_interface/src')
-rw-r--r--lib/erl_interface/src/connect/ei_resolve.c7
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 */