aboutsummaryrefslogtreecommitdiffstats
path: root/src/udp_server.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2011-09-15 09:15:19 +0200
committerMax Kellermann <max@duempel.org>2011-09-15 09:25:53 +0200
commit76ec3d324815808beaf79b73336ff42e6c0b2b73 (patch)
tree61bb2cb1a8ad1663a26bbccc9acf3bd95b0725f1 /src/udp_server.c
parentd0c85a5a96022f9ef091b335c418eef5b290d6cc (diff)
downloadmpd-76ec3d324815808beaf79b73336ff42e6c0b2b73.tar.gz
mpd-76ec3d324815808beaf79b73336ff42e6c0b2b73.tar.xz
mpd-76ec3d324815808beaf79b73336ff42e6c0b2b73.zip
udp_server: disable -Wmissing-field-initializers
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;