bb56798f40
based on a patch from Craig Barraclough <craigba at creative dot com dot au>
58 lines
1.5 KiB
Plaintext
58 lines
1.5 KiB
Plaintext
$OpenBSD: patch-honeyd_overload_c,v 1.2 2003/12/05 22:05:34 sturm Exp $
|
|
--- honeyd_overload.c.orig 2003-06-26 00:04:01.000000000 +0200
|
|
+++ honeyd_overload.c 2003-12-05 22:51:39.000000000 +0100
|
|
@@ -595,7 +595,7 @@ poll(struct pollfd *fds, int nfds, int t
|
|
ssize_t
|
|
recv(int sock, void *buf, size_t len, int flags)
|
|
{
|
|
- ssize_t ret;
|
|
+ socklen_t ret;
|
|
|
|
INIT;
|
|
|
|
@@ -611,14 +611,14 @@ ssize_t
|
|
recvfrom(int sock, void *buf, size_t len, int flags, struct sockaddr *from,
|
|
socklen_t *fromlen)
|
|
{
|
|
- ssize_t ret;
|
|
+ socklen_t ret;
|
|
struct fd *nfd;
|
|
socklen_t flen = fromlen != NULL ? *fromlen : 0;
|
|
|
|
INIT;
|
|
|
|
- DPRINTF((stderr, "%s: called on %d, %p,%d\n",
|
|
- __func__, sock, from, len));
|
|
+ DPRINTF((stderr, "%s: called on %d, %p,%ld\n",
|
|
+ __func__, sock, from, (long)len));
|
|
|
|
ret = (*libc_recvfrom)(sock, buf, len, flags, from, fromlen);
|
|
|
|
@@ -640,7 +640,7 @@ sendto(int sock, const void *buf, size_t
|
|
const struct sockaddr *to, socklen_t tolen)
|
|
{
|
|
struct fd *nfd;
|
|
- ssize_t ret;
|
|
+ socklen_t ret;
|
|
|
|
INIT;
|
|
|
|
@@ -780,7 +780,7 @@ accept(int sock, struct sockaddr *addr,
|
|
{
|
|
struct fd *nfd;
|
|
struct sockaddr_storage sa;
|
|
- socklen_t salen;
|
|
+ size_t salen;
|
|
int fd;
|
|
|
|
INIT;
|
|
@@ -800,7 +800,7 @@ accept(int sock, struct sockaddr *addr,
|
|
}
|
|
|
|
/* XXX - something good happened! */
|
|
- DPRINTF((stderr, "%s: got %d (salen %d)\n", __func__, fd, salen));
|
|
+ DPRINTF((stderr, "%s: got %d (salen %ld)\n", __func__, fd, (long)salen));
|
|
|
|
/* Store for later */
|
|
nfd->rsalen = salen;
|