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
gcc -Iinclude -Wall -O2 -g -DTPROXY -DENABLE_POLL -DENABLE_KQUEUE
-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).
Willy Tarreau wrote:
> Hi,
>
> On Tue, Aug 04, 2009 at 01:10:52AM +0200, Andrew Azarov wrote:
>
>> Hi,
>>
>> While compiling the 1.4 dev 1 version snapshot I encountered this error
>>
>> fw# gmake USE_PCRE=1 TARGET=freebsd
>>
> (...)
>
>> gcc -Iinclude -Wall -O2 -g -DTPROXY -DENABLE_POLL -DENABLE_KQUEUE
>> -DUSE_PCRE -I/usr/local/include -DCONFIG_HAPROXY_VERSION=\"1.4-dev1\"
>> -DCONFIG_HAPROXY_DATE=\"2009/07/27\" -c -o src/stream_sock.o
>> src/stream_sock.c
>> In file included from src/stream_sock.c:19:
>> /usr/include/netinet/tcp.h:40: error: expected '=', ',', ';', 'asm' or
>> '__attribute__' before 'tcp_seq'
>> /usr/include/netinet/tcp.h:50: error: expected specifier-qualifier-list
>> before 'u_short'
>> /usr/include/netinet/tcp.h:175: error: expected specifier-qualifier-list
>> before 'u_int8_t'
>> gmake: *** [src/stream_sock.o] Error 1
>>
>
> quite strange, it means they provide a header which does not solve its
> own dependencies. Could you please try to add the following line before
> #include <netinet/tcp.h> in src/stream_sock.c :
>
> #include <sys/types.h>
>
> I think it should fix the issue. If so, I'll add it to the source.
>
> Thanks!
> Willy
>
>
>
Received on 2009/08/05 14:16
This archive was generated by hypermail 2.2.0 : 2009/08/05 14:30 CEST