[Buildroot] [PATCH v1] uhtppd: fix TCP_FASTOPEN related compile error

Thomas Petazzoni thomas.petazzoni at free-electrons.com
Wed Mar 29 21:00:43 UTC 2017


Hello,

On Wed, 29 Mar 2017 06:37:32 +0300, Baruch Siach wrote:

> > +diff --git a/listen.c b/listen.c
> > +index 2a54888..727bff8 100644
> > +--- a/listen.c
> > ++++ b/listen.c
> > +@@ -107,18 +107,24 @@ void uh_setup_listeners(void)
> > + 		/* TCP keep-alive */
> > + 		if (conf.tcp_keepalive > 0) {
> > + #ifdef linux
> > +-			int tcp_ka_idl, tcp_ka_int, tcp_ka_cnt, tcp_fstopn;
> > ++			int tcp_ka_idl, tcp_ka_int, tcp_ka_cnt;
> > ++#ifdef TCP_FASTOPEN
> > ++			int tcp_fstopn;
> > ++#endif  
> 
> I might be cleaner to do instead:
> 
> #ifndef TCP_FASTOPEN
> #define TCP_FASTOPEN 23
> #endif

Agreed. If the kernel doesn't support it, then the setsockopt() call
will fail, but since the code doesn't check its return value, it
doesn't matter.

Also: in the commit title, there's a typo in the package name.

Thanks!

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com



More information about the buildroot mailing list