aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/udp_server.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/udp_server.c b/src/udp_server.c
index 5cfc816d6..152eb37d1 100644
--- a/src/udp_server.c
+++ b/src/udp_server.c
@@ -19,6 +19,7 @@
#include "udp_server.h"
#include "io_thread.h"
+#include "gcc.h"
#include <glib.h>
#include <unistd.h>
@@ -34,6 +35,12 @@
#include <netinet/in.h>
#endif
+#if GCC_CHECK_VERSION(4, 2)
+/* allow C99 initialisers on struct sockaddr_in, even if the
+ (non-portable) attribute "sin_zero" is missing */
+#pragma GCC diagnostic ignored "-Wmissing-field-initializers"
+#endif
+
struct udp_server {
const struct udp_server_handler *handler;
void *handler_ctx;