Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH v1] uhtppd: fix TCP_FASTOPEN related compile error
Date: Wed, 29 Mar 2017 23:00:43 +0200	[thread overview]
Message-ID: <20170329230043.1696cd44@free-electrons.com> (raw)
In-Reply-To: <20170329033732.v3tqayzoucwx5ies@tarshish>

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

      reply	other threads:[~2017-03-29 21:00 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-28 20:29 [Buildroot] [PATCH v1] uhtppd: fix TCP_FASTOPEN related compile error Peter Seiderer
2017-03-29  3:37 ` Baruch Siach
2017-03-29 21:00   ` Thomas Petazzoni [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170329230043.1696cd44@free-electrons.com \
    --to=thomas.petazzoni@free-electrons.com \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox