summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog3
-rw-r--r--Src/Modules/tcp.c4
2 files changed, 5 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index e7b7ef225..03e42760f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2002-05-14  Peter Stephenson  <pws@csr.com>
 
+	* 17162: Src/Modules/tcp.c: prevent warning on gethostbyaddr()
+	arguments.
+
 	* 17161: Src/Modules/tcp.c: length parameter to accept() wasn't
 	initialised, causing random failures.
 
diff --git a/Src/Modules/tcp.c b/Src/Modules/tcp.c
index c70d5bf69..78ce386db 100644
--- a/Src/Modules/tcp.c
+++ b/Src/Modules/tcp.c
@@ -565,12 +565,12 @@ bin_ztcp(char *nam, char **args, char *ops, int func)
 
 		if (sess->fd != -1)
 		{
-		    zthost = gethostbyaddr(&(sess->sock.in.sin_addr), sizeof(struct sockaddr_in), AF_INET);
+		    zthost = gethostbyaddr((const void *)&(sess->sock.in.sin_addr), sizeof(struct sockaddr_in), AF_INET);
 		    if (zthost)
 			localname = zthost->h_name;
 		    else
 			localname = ztrdup(inet_ntoa(sess->sock.in.sin_addr));
-		    ztpeer = gethostbyaddr(&(sess->peer.in.sin_addr), sizeof(struct sockaddr_in), AF_INET);
+		    ztpeer = gethostbyaddr((const void *)&(sess->peer.in.sin_addr), sizeof(struct sockaddr_in), AF_INET);
 		    if (ztpeer)
 			remotename = ztpeer->h_name;
 		    else