On Mon, Aug 8, 2016 at 2:09 PM, Willy Tarreau <[email protected]> wrote: > On Mon, Aug 08, 2016 at 02:05:58PM +0200, Baptiste wrote: > > It won't, I'm sending you a patch soon to define _GNU_SOURCE in > proto_tcp.c > > :) > > (which seems to "fix" the problem, also I don't know if this is the right > > way to go) > > Perfect, thanks. Please put it before the first include in the file, it > will avoid some inconsistencies between the files causing some build > issues. > > Thanks, > Willy >
Here you go :) Baptiste
From 2a1c2b20eb514e7b27bc8bf48d3773bfe4b761dd Mon Sep 17 00:00:00 2001 From: Baptiste Assmann <[email protected]> Date: Mon, 8 Aug 2016 14:12:08 +0200 Subject: [PATCH] BUILD: make proto_tcp.c compatible with musl library 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 | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/proto_tcp.c b/src/proto_tcp.c index 4f6b3c3..717ba28 100644 --- a/src/proto_tcp.c +++ b/src/proto_tcp.c @@ -10,6 +10,11 @@ * */ +/* 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> -- 1.9.1

