3 Defining _GNU_SOURCE is required to get proper member names in `struct udphdr`
4 when building against musl. Build error:
6 util.c: In function 'RawFillHeaders':
7 util.c:481:9: error: 'struct udphdr' has no member named 'source'
8 udph->source = htons(portsrc);
10 util.c:482:9: error: 'struct udphdr' has no member named 'dest'
11 udph->dest = htons(portdst);
13 util.c:483:9: error: 'struct udphdr' has no member named 'len'
14 udph->len = htons(sizeof(struct udphdr) + len);
16 util.c:484:9: error: 'struct udphdr' has no member named 'check'
19 Including <sys/types.h> in needed for mode_t, otherwise musl build fails:
20 util.h:91:1: error: unknown type name 'mode_t'
22 Signed-off-by: Jörg Krause <joerg.krause@embedded.rocks>
23 Sent upstream: https://mailman.videolan.org/pipermail/multicat-devel/2016-March/000126.html
25 diff -purN multicat-2.1.orig/util.c multicat-2.1/util.c
26 --- multicat-2.1.orig/util.c 2015-07-17 18:03:17.000000000 +0200
27 +++ multicat-2.1/util.c 2016-03-19 22:21:01.110178772 +0100
29 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
30 *****************************************************************************/
37 diff -purN multicat-2.1.orig/util.h multicat-2.1/util.h
38 --- multicat-2.1.orig/util.h 2015-07-15 22:47:39.000000000 +0200
39 +++ multicat-2.1/util.h 2016-03-19 22:21:58.649834990 +0100
41 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
42 *****************************************************************************/
44 +#include <sys/types.h>
45 #include <netinet/udp.h>
46 #include <netinet/ip.h>