Missing #include <netinet/tcp.h>?
- Dominant language
- Java
- Stars
- 253
- Forks
- 178
- PR merge metrics
- No merged PRs in 30d
Description
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 `` immediately after ``.
`#include
+#include `
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`
Contributor guide
No contributing guide indexed for this repository
Research direction
Start in src/antlr3debughandlers.c around the handshake function and inspect the headers included near antlr3.h. Reproduce the libantlr3c-3.4 build with --enable-debuginfo on the affected SunOS environment, then verify that TCP_NODELAY is declared and compilation completes successfully.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- networking
- Issue type
- Bug
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100