]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
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 4f6b3c3e154d5503cdce950e2761860501d71569..717ba289c3e16fa958b443eedfaf9cb18adac350 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>