From 2e5a3f73cff8aea6c882444c9de6de145cd3a39f Mon Sep 17 00:00:00 2001 From: David Bigagli <david@schedmd.com> Date: Thu, 9 Oct 2014 10:44:01 -0700 Subject: [PATCH] Update the signature of net_set_low_water() from int fo socklen_t. --- src/common/net.c | 2 +- src/common/net.h | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/common/net.c b/src/common/net.c index 7605a945d2b..4941816e1c3 100644 --- a/src/common/net.c +++ b/src/common/net.c @@ -168,7 +168,7 @@ int readn(int fd, void *buf, size_t nbytes) return(n); } -int net_set_low_water(int sock, int size) +int net_set_low_water(int sock, socklen_t size) { if (setsockopt(sock, SOL_SOCKET, SO_RCVLOWAT, (const void *) &size, sizeof(size)) < 0) { diff --git a/src/common/net.h b/src/common/net.h index 87a3d31309c..0d64a5b7272 100644 --- a/src/common/net.h +++ b/src/common/net.h @@ -41,6 +41,7 @@ #define _NET_H #include <stdint.h> +#include <sys/socket.h> #include "src/common/macros.h" @@ -59,7 +60,7 @@ extern int net_accept_stream(int fd); /* set low water mark on socket */ -extern int net_set_low_water(int sock, int size); +extern int net_set_low_water(int sock, socklen_t size); /* set keep alive time on socket */ extern int net_set_keep_alive(int sock); -- GitLab