diff options
author | H. Peter Anvin <hpa@zytor.com> | 2009-12-11 16:05:48 -0800 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2009-12-11 16:07:10 -0800 |
commit | a63534e6e6fa351d1c51b1d7cd14f916af3f835a (patch) | |
tree | 09b8e72bedab8e64c0d3caae62a64a911db9552e | |
parent | e7a7b194833a5283ac5c4cf24db370e70cf2674f (diff) | |
download | tftp-hpa-a63534e6e6fa351d1c51b1d7cd14f916af3f835a.tar.gz |
recvfrom: fix the type of the fallthrough case
If we can't figure out the source address, we have the "fall on our
face" version of myrecvfrom(); make sure its prototype matches. This
handles building on machines where sockaddr_t != int and yet there is
no way to get the source address. This apparently affects at least
one version of Solaris.
Reported-by: Georg Schwarz <georg.schwarz@freenet.de>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
-rw-r--r-- | tftpd/recvfrom.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tftpd/recvfrom.c b/tftpd/recvfrom.c index 389ba82..3ee5642 100644 --- a/tftpd/recvfrom.c +++ b/tftpd/recvfrom.c @@ -245,7 +245,8 @@ myrecvfrom(int s, void *buf, int len, unsigned int flags, int myrecvfrom(int s, void *buf, int len, unsigned int flags, - struct sockaddr *from, int *fromlen, union sock_addr *myaddr) + struct sockaddr *from, socklen_t * fromlen, + union sock_addr *myaddr) { /* There is no way we can get the local address, fudge it */ |