antlr3
antlr3 copied to clipboard
Missing #include <netinet/tcp.h>?
I was compiling libantlr3c-3.4 on SunOS 5.10 on sparc, and I had a problem compiling antlr3debughandlers.c with --enable-debuginfo turned on.
src/antlr3debughandlers.c:302:42: error: 'TCP_NODELAY' undeclared (first use in this function)
I successfully resolved my problem by including <netinet/tcp.h>
immediately after <antlr3.h>
.
#include <antlr3.h> +#include <netinet/tcp.h>
I have the full uname, and make error below just in case it helps.
Cheers, --Tim
Details: This can be repeated as of October 23 on the file at http://antlr.org/download/C/libantlr3c-3.4.tar.gz
$ uname -a
SunOS crunchy12 5.10 Generic_147440-19 sun4u sparc SUNW,Sun-Fire-V440
Full error:
/bin/bash ./libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -Iinclude -m64 -O2 -Wall -fexceptions -MT antlr3debughandlers.lo -MD -MP -MF .deps/antlr3debughandlers.Tpo -c -o antlr3debughandlers.lo
test -f 'src/antlr3debughandlers.c' || echo './'src/antlr3debughandlers.c libtool: compile: gcc -DHAVE_CONFIG_H -I. -Iinclude -m64 -O2 -Wall -fexceptions -MT antlr3debughandlers.lo -MD -MP -MF .deps/antlr3debughandlers.Tpo -c src/antlr3debughandlers.c -fPIC -DPIC -o .libs/antlr3debughandlers.o src/antlr3debughandlers.c: In function 'handshake': src/antlr3debughandlers.c:302:42: error: 'TCP_NODELAY' undeclared (first use in this function) src/antlr3debughandlers.c:302:42: note: each undeclared identifier is reported only once for each function it appears in make[1]: *** [antlr3debughandlers.lo] Error 1