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 #include @@ -34,6 +35,12 @@ #include #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;