summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSébastien Helleu <flashcode@flashtux.org>2018-07-01 15:39:34 +0200
committerSébastien Helleu <flashcode@flashtux.org>2018-07-01 15:39:34 +0200
commit5decae145fdc58d807a19405fbcdf321871eb50d (patch)
tree7562def6dfa641121a8bb6e6083c24e56d117ee8 /src
parent6292896021188d690b258731cbf7680f76d2fe64 (diff)
downloadweechat-5decae145fdc58d807a19405fbcdf321871eb50d.zip
relay: fix socket creation for relay server on OpenBSD (closes #1213)
The socket option IPV6_V6ONLY is not needed on OpenBSD and must not be set (it is read-only).
Diffstat (limited to 'src')
-rw-r--r--src/plugins/relay/relay-server.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/relay/relay-server.c b/src/plugins/relay/relay-server.c
index 73768e021..b10a758be 100644
--- a/src/plugins/relay/relay-server.c
+++ b/src/plugins/relay/relay-server.c
@@ -451,7 +451,7 @@ relay_server_create_socket (struct t_relay_server *server)
return 0;
}
-#ifdef IPV6_V6ONLY
+#if defined(IPV6_V6ONLY) && !defined(__OpenBSD__)
/* set option IPV6_V6ONLY to 0 or 1 */
if (server->ipv6)
{
@@ -469,7 +469,7 @@ relay_server_create_socket (struct t_relay_server *server)
return 0;
}
}
-#endif /* IPV6_V6ONLY */
+#endif
/* set option SO_REUSEADDR to 1 */
set = 1;