AROS: we need htons to convert socket port to network order
authorRonnie Sahlberg <ronniesahlberg@gmail.com>
Sat, 13 Apr 2013 01:12:56 +0000 (18:12 -0700)
committerRonnie Sahlberg <ronniesahlberg@gmail.com>
Sat, 13 Apr 2013 01:12:56 +0000 (18:12 -0700)
aros/aros_compat.c

index 02c0954d6eec48d7c6f6c8d5777e9a936e78f360..955f8e382d5a5ce176ce1859ea1450c45a0d1e41 100644 (file)
@@ -40,7 +40,7 @@ struct addrinfo **res)
 
   sin->sin_port=0;
   if (service) {
-    sin->sin_port=atoi(service);
+    sin->sin_port=htons(atoi(service));
   } 
 
   *res = malloc(sizeof(struct addrinfo));