Commit 402e23b4 authored by Trond Myklebust's avatar Trond Myklebust

SUNRPC: Fix stupid typo in xs_sock_set_reuseport

Yes, kernel_setsockopt() hates you for using a char argument.
Signed-off-by: default avatarTrond Myklebust <trond.myklebust@primarydata.com>
parent 54c09874
......@@ -1629,9 +1629,10 @@ static unsigned short xs_get_random_port(void)
*/
static void xs_sock_set_reuseport(struct socket *sock)
{
char opt = 1;
int opt = 1;
kernel_setsockopt(sock, SOL_SOCKET, SO_REUSEPORT, &opt, sizeof(opt));
kernel_setsockopt(sock, SOL_SOCKET, SO_REUSEPORT,
(char *)&opt, sizeof(opt));
}
static unsigned short xs_sock_getport(struct socket *sock)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment