PCI: adds device-specific data pointer
[akaros.git] / user / bsd / _sock_ingetaddr.c
index 1f68681..1b5abcd 100644 (file)
@@ -44,7 +44,7 @@ _sock_ingetaddr(Rock *r, struct sockaddr_in *ip, int *alen, char *a)
                        if(p){
                                *p++ = 0;
                                ip->sin_family = AF_INET;
-                               ip->sin_port = atoi(p);
+                               ip->sin_port = htons(atoi(p));
                                ip->sin_addr.s_addr = inet_addr(name);
                                if(alen)
                                        *alen = sizeof(struct sockaddr_in);