Re: 1.4 dev 1 under FreeBSD 7.2 and gmake-3.81_3 error when compiling

From: Willy Tarreau <>
Date: Wed, 5 Aug 2009 15:28:56 +0200

Hi Andrew,

On Wed, Aug 05, 2009 at 02:16:09PM +0200, Andrew Azarov wrote:
> Hi Willy,
> This thing is also happened in backend.c and proto_tcp.c...
> I've added the types.h before tcp.h and it fixed it... But then this
> error popped out:
> gmake USE_PCRE=1 TARGET=freebsd
> -DUSE_PCRE -I/usr/local/include -DCONFIG_HAPROXY_VERSION=\"1.4-dev1\"
> -DCONFIG_HAPROXY_DATE=\"2009/07/27\" -c -o src/proto_tcp.o src/proto_tcp.c
> src/proto_tcp.c: In function 'tcp_bind_listener':
> src/proto_tcp.c:256: error: 'SOL_TCP' undeclared (first use in this
> function)
> src/proto_tcp.c:256: error: (Each undeclared identifier is reported only
> once
> src/proto_tcp.c:256: error: for each function it appears in.)
> gmake: *** [src/proto_tcp.o] Error 1
> I just changed sol_tcp to 6 (number of the protocol as stated in the
> man) and it compiled...
> Seems like freebsd 7.2 has no support for SOL_TCP anymore (even in the
> sources), they've got a new system using /etc/protocols.
> from the setsockopt man:
> To manipulate
> options at any other level the protocol number of the appropriate
> proto-
> col controlling the option is supplied. For example, to indicate
> that an
> option is to be interpreted by the TCP protocol, level should be set to
> the protocol number of TCP; see getprotoent(3).

That's quite a strange design choice, to consider that you cannot perform system calls without checking values from a file first :-/

Well, I think I'll simplify the issue by conditionning the parts which depend on those defines to the existence of the defines themselves. It will be more robust.

Willy Received on 2009/08/05 15:28

This archive was generated by hypermail 2.2.0 : 2009/08/05 15:30 CEST