On Mon, Aug 08, 2016 at 01:28:07PM +0200, Baptiste wrote: > Here you go: > # fgrep -r tcp_info /usr/include/* > /usr/include/linux/tcp.h:struct tcp_info { > /usr/include/netinet/tcp.h:struct tcp_info
It's strange that your netinet/tcp.h has it and that it doesn't work, maybe there's some ifdef around. > It seems to be exactly the same that on my ubuntu 14.04. > alpine linux natively use musl, an alternative libc library. I tried to > install a "real" libc instead, with the same error as above (that said, I > wonder how much my libc library was used or not, I'm investigating in that > direction). Interesting. Thus there's something I don't understand well, you don't build natively then, do you ? Aren't you using a cross-compiler instead ? If so, that may be where we need to dig. > Note that I don't have any problem compiling HAProxy 1.6-latest on the same > OS. I'm not surprized, the tcp_info was added in 1.7 a few weeks ago :-) Please tell me if the attached patch fixes the issue. Thanks, Willy
diff --git a/src/proto_tcp.c b/src/proto_tcp.c index 4f6b3c3..0e27fdd 100644 --- a/src/proto_tcp.c +++ b/src/proto_tcp.c @@ -61,6 +61,11 @@ #include <proto/stream_interface.h> #include <proto/task.h> +/* be sure to include struct tcp_info on some linux distros */ +#if defined(TCP_INFO) && defined(USE_NETFILTER) +#include <linux/tcp.h> +#endif + static int tcp_bind_listeners(struct protocol *proto, char *errmsg, int errlen); static int tcp_bind_listener(struct listener *listener, char *errmsg, int errlen);