1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-23 00:43:28 +00:00

ntohl() missing on result from gethostbyname()

This commit is contained in:
Poul-Henning Kamp 1997-03-01 20:05:41 +00:00
parent 1f50028026
commit 7d15b64d19
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=5780
3 changed files with 60 additions and 0 deletions

View File

@ -0,0 +1,20 @@
diff -u -r tnm/generic/tnmUtil.c tnm/generic/tnmUtil.c
--- ../tnm/generic/tnmUtil.c Tue Aug 6 17:20:38 1996
+++ ../tnm/generic/tnmUtil.c Sat Mar 1 20:45:12 1997
@@ -400,7 +400,7 @@
if (hostEntry) {
struct sockaddr_in *caddr;
caddr = (struct sockaddr_in *) Tcl_GetHashValue(hostEntry);
- addr->sin_addr.s_addr = caddr->sin_addr.s_addr;
+ addr->sin_addr.s_addr = ntohl(caddr->sin_addr.s_addr);
return TCL_OK;
}
@@ -425,6 +425,7 @@
memcpy((char *) &addr->sin_addr, (char *) &hostaddr, 4);
}
+ addr->sin_addr.s_addr = ntohl(addr->sin_addr.s_addr);
return TCL_OK;
}

20
net/scotty/files/patch-ab Normal file
View File

@ -0,0 +1,20 @@
diff -u -r tnm/generic/tnmUtil.c tnm/generic/tnmUtil.c
--- ../tnm/generic/tnmUtil.c Tue Aug 6 17:20:38 1996
+++ ../tnm/generic/tnmUtil.c Sat Mar 1 20:45:12 1997
@@ -400,7 +400,7 @@
if (hostEntry) {
struct sockaddr_in *caddr;
caddr = (struct sockaddr_in *) Tcl_GetHashValue(hostEntry);
- addr->sin_addr.s_addr = caddr->sin_addr.s_addr;
+ addr->sin_addr.s_addr = ntohl(caddr->sin_addr.s_addr);
return TCL_OK;
}
@@ -425,6 +425,7 @@
memcpy((char *) &addr->sin_addr, (char *) &hostaddr, 4);
}
+ addr->sin_addr.s_addr = ntohl(addr->sin_addr.s_addr);
return TCL_OK;
}

View File

@ -0,0 +1,20 @@
diff -u -r tnm/generic/tnmUtil.c tnm/generic/tnmUtil.c
--- ../tnm/generic/tnmUtil.c Tue Aug 6 17:20:38 1996
+++ ../tnm/generic/tnmUtil.c Sat Mar 1 20:45:12 1997
@@ -400,7 +400,7 @@
if (hostEntry) {
struct sockaddr_in *caddr;
caddr = (struct sockaddr_in *) Tcl_GetHashValue(hostEntry);
- addr->sin_addr.s_addr = caddr->sin_addr.s_addr;
+ addr->sin_addr.s_addr = ntohl(caddr->sin_addr.s_addr);
return TCL_OK;
}
@@ -425,6 +425,7 @@
memcpy((char *) &addr->sin_addr, (char *) &hostaddr, 4);
}
+ addr->sin_addr.s_addr = ntohl(addr->sin_addr.s_addr);
return TCL_OK;
}