Make this compile on arches where size_t and socklen_t are typedef:ed

to different types.
This commit is contained in:
kristerw 2003-10-23 23:01:33 +00:00
parent d0381333dc
commit 4a356f6bf2
2 changed files with 9 additions and 6 deletions

View file

@ -1,4 +1,4 @@
$NetBSD: distinfo,v 1.4 2002/08/14 16:18:40 tron Exp $
$NetBSD: distinfo,v 1.5 2003/10/23 23:01:33 kristerw Exp $
SHA1 (Wormz-1.0b5.tar.gz) = a5e45e90fcc0eb4d188508bdffe71220ddcd20a4
Size (Wormz-1.0b5.tar.gz) = 436954 bytes
@ -6,7 +6,7 @@ SHA1 (patch-aa) = d662af7e771fe1cec709bc09dbc9df5d9e634adf
SHA1 (patch-ab) = 44c938189653de05b48a3ea8ec01442a1c5f22f6
SHA1 (patch-ac) = 7a7764b24bd5c1c6f5121508b9bf618a71cdc8de
SHA1 (patch-ad) = 8754a4a826273354e5b98586c44add9b818a3d53
SHA1 (patch-ae) = e01abdeb3334139d2ab0d46e191edc876639960b
SHA1 (patch-ae) = bb53d7bb3eefb2ea144798435cb4266a884acecb
SHA1 (patch-af) = 0ff265b68256d11581cb10a7a68234f9c3de834e
SHA1 (patch-ag) = d1e50491f1dcdcc6e35540f4bebc40504263c8a3
SHA1 (patch-ah) = 4b5cbc48bc7687f36ce9b634d38011bfedb4b11e

View file

@ -1,7 +1,7 @@
$NetBSD: patch-ae,v 1.1 2002/08/14 16:18:41 tron Exp $
$NetBSD: patch-ae,v 1.2 2003/10/23 23:01:33 kristerw Exp $
--- Network/UDPConnection.cc.orig Tue Jul 7 23:02:47 1998
+++ Network/UDPConnection.cc Wed Aug 14 18:05:03 2002
+++ Network/UDPConnection.cc Fri Oct 24 00:06:52 2003
@@ -66,7 +66,7 @@
}
@ -20,12 +20,15 @@ $NetBSD: patch-ae,v 1.1 2002/08/14 16:18:41 tron Exp $
if (getsockname (socket_fd, (sockaddr *) &addr, &addr_len)) {
close(socket_fd);
StdError("can't get sockname");
@@ -166,7 +166,7 @@
@@ -166,9 +166,9 @@
return 0;
// some data!
- int addr_len = sizeof(addr);
+ socklen_t addr_len = sizeof(addr);
sockaddr_in in_addr;
bzero(&in_addr, addr_len);
- bzero(&in_addr, addr_len);
+ bzero(&in_addr, (int)addr_len);
int ret = recvfrom (socket_fd, buffer, maxsize, 0, (sockaddr *) &in_addr, &addr_len);
if (ret <= 0) {
StdError("can't receive message");