aboutsummaryrefslogtreecommitdiffstats
path: root/src/udp_server.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/udp_server.c')
-rw-r--r--src/udp_server.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/udp_server.c b/src/udp_server.c
index e70f785e2..f96b40b6b 100644
--- a/src/udp_server.c
+++ b/src/udp_server.c
@@ -97,6 +97,9 @@ udp_server_new(unsigned port,
.s_addr = htonl(INADDR_ANY),
},
.sin_port = htons(port),
+#if defined(__linux__) && !GCC_CHECK_VERSION(4, 2)
+ .sin_zero = { 0 },
+#endif
};
if (bind(fd, (const struct sockaddr *)&address, sizeof(address)) < 0) {