[or-cvs] improve portability: inet_aton is missing on solaris
Roger Dingledine
arma at seul.org
Fri Jun 13 09:25:58 UTC 2003
Update of /home/or/cvsroot/src/or
In directory moria.mit.edu:/home/arma/work/onion/cvs/src/or
Modified Files:
connection.c
Log Message:
improve portability: inet_aton is missing on solaris
Index: connection.c
===================================================================
RCS file: /home/or/cvsroot/src/or/connection.c,v
retrieving revision 1.63
retrieving revision 1.64
diff -u -d -r1.63 -r1.64
--- connection.c 12 Jun 2003 10:16:33 -0000 1.63
+++ connection.c 13 Jun 2003 09:25:55 -0000 1.64
@@ -272,8 +272,7 @@
if(ap_listenport) {
bindaddr.sin_port = htons(ap_listenport);
- inet_aton("127.0.0.1", &(bindaddr.sin_addr)); /* the AP listens only on localhost! */
- /* XXX inet_aton is missing on solaris. use something simpler? */
+ bindaddr.sin_addr.s_addr = htonl(INADDR_LOOPBACK); /* the AP listens only on localhost! */
if(!connection_get_by_type(CONN_TYPE_AP_LISTENER)) {
connection_ap_create_listener(&bindaddr);
}
More information about the tor-commits
mailing list