BUILD: make proto_tcp.c compatible with musl library
authorBaptiste Assmann <bedis9@gmail.com>
Mon, 8 Aug 2016 12:12:08 +0000 (14:12 +0200)
committerWilly Tarreau <w@1wt.eu>
Mon, 8 Aug 2016 12:20:23 +0000 (14:20 +0200)
musl library expose tcp_info structure only when _GNU_SOURCE is defined.
This is required to build HAProxy on OSes relying musl such as Alpine
Linux.

src/proto_tcp.c

index 4f6b3c3..717ba28 100644 (file)
  *
  */
 
+/* this is to have tcp_info defined on systems using musl
+ * library, such as Alpine Linux
+ */
+#define _GNU_SOURCE
+
 #include <ctype.h>
 #include <errno.h>
 #include <fcntl.h>