aboutsummaryrefslogtreecommitdiff
path: root/nbd.c
diff options
context:
space:
mode:
Diffstat (limited to 'nbd.c')
-rw-r--r--nbd.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/nbd.c b/nbd.c
index 1586ea7553..b397a5f487 100644
--- a/nbd.c
+++ b/nbd.c
@@ -169,7 +169,8 @@ int tcp_socket_incoming(const char *address, uint16_t port)
memcpy(&addr.sin_addr.s_addr, &in, sizeof(in));
opt = 1;
- if (setsockopt(s, SOL_SOCKET, SO_REUSEADDR, &opt, sizeof(opt)) == -1) {
+ if (setsockopt(s, SOL_SOCKET, SO_REUSEADDR,
+ (const void *) &opt, sizeof(opt)) == -1) {
goto error;
}