All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH v2] uhttpd: fix TCP_FASTOPEN related compile error
@ 2017-04-03 17:29 Peter Seiderer
  2017-04-03 17:36 ` Baruch Siach
  2017-04-03 19:19 ` Thomas Petazzoni
  0 siblings, 2 replies; 5+ messages in thread
From: Peter Seiderer @ 2017-04-03 17:29 UTC (permalink / raw)
  To: buildroot

Fixes [1]:

  .../uhttpd-a8bf9c00842224edb394e79909053f7628ee6a82/listen.c: In function 'uh_setup_listeners':
  .../uhttpd-a8bf9c00842224edb394e79909053f7628ee6a82/listen.c:120:30: error: 'TCP_FASTOPEN' undeclared (first use in this function)

[1] http://autobuild.buildroot.net/results/56e/56e0727ccd1255b05e03d1b79dc238bd88701230

Signed-off-by: Peter Seiderer <ps.report@gmx.net>
---
Changes v1 -> v2:
  - use conditional define for TCP_FASTOPEN (Baruch Siach, Thomas Petazzoni)
  - fix subject typo (Thomas Petazzoni)
---
 ...02-Fix-TCP_FASTOPEN-related-compile-error.patch | 30 ++++++++++++++++++++++
 1 file changed, 30 insertions(+)
 create mode 100644 package/uhttpd/0002-Fix-TCP_FASTOPEN-related-compile-error.patch

diff --git a/package/uhttpd/0002-Fix-TCP_FASTOPEN-related-compile-error.patch b/package/uhttpd/0002-Fix-TCP_FASTOPEN-related-compile-error.patch
new file mode 100644
index 000000000..fb3ff54ae
--- /dev/null
+++ b/package/uhttpd/0002-Fix-TCP_FASTOPEN-related-compile-error.patch
@@ -0,0 +1,30 @@
+From adbab70d3602d77736781be344cfdc5508cb0600 Mon Sep 17 00:00:00 2001
+From: Peter Seiderer <ps.report@gmx.net>
+Date: Mon, 3 Apr 2017 19:22:30 +0200
+Subject: [PATCH] Fix TCP_FASTOPEN related compile error.
+
+Signed-off-by: Peter Seiderer <ps.report@gmx.net>
+---
+ listen.c | 6 ++++++
+ 1 file changed, 6 insertions(+)
+
+diff --git a/listen.c b/listen.c
+index 2a54888..4dabe34 100644
+--- a/listen.c
++++ b/listen.c
+@@ -96,6 +96,12 @@ static void listener_cb(struct uloop_fd *fd, unsigned int events)
+ 		uh_block_listener(l);
+ }
+ 
++#ifdef linux
++#ifndef TCP_FASTOPEN
++#define TCP_FASTOPEN 23
++#endif
++#endif
++
+ void uh_setup_listeners(void)
+ {
+ 	struct listener *l;
+-- 
+2.11.0
+
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [Buildroot] [PATCH v2] uhttpd: fix TCP_FASTOPEN related compile error
  2017-04-03 17:29 [Buildroot] [PATCH v2] uhttpd: fix TCP_FASTOPEN related compile error Peter Seiderer
@ 2017-04-03 17:36 ` Baruch Siach
  2017-04-03 17:48   ` Peter Seiderer
  2017-04-03 19:19 ` Thomas Petazzoni
  1 sibling, 1 reply; 5+ messages in thread
From: Baruch Siach @ 2017-04-03 17:36 UTC (permalink / raw)
  To: buildroot

Hi Peter,

On Mon, Apr 03, 2017 at 07:29:08PM +0200, Peter Seiderer wrote:
> Fixes [1]:
> 
>   .../uhttpd-a8bf9c00842224edb394e79909053f7628ee6a82/listen.c: In function 'uh_setup_listeners':
>   .../uhttpd-a8bf9c00842224edb394e79909053f7628ee6a82/listen.c:120:30: error: 'TCP_FASTOPEN' undeclared (first use in this function)
> 
> [1] http://autobuild.buildroot.net/results/56e/56e0727ccd1255b05e03d1b79dc238bd88701230
> 
> Signed-off-by: Peter Seiderer <ps.report@gmx.net>
> ---
> Changes v1 -> v2:
>   - use conditional define for TCP_FASTOPEN (Baruch Siach, Thomas Petazzoni)
>   - fix subject typo (Thomas Petazzoni)
> ---
>  ...02-Fix-TCP_FASTOPEN-related-compile-error.patch | 30 ++++++++++++++++++++++
>  1 file changed, 30 insertions(+)
>  create mode 100644 package/uhttpd/0002-Fix-TCP_FASTOPEN-related-compile-error.patch
> 
> diff --git a/package/uhttpd/0002-Fix-TCP_FASTOPEN-related-compile-error.patch b/package/uhttpd/0002-Fix-TCP_FASTOPEN-related-compile-error.patch
> new file mode 100644
> index 000000000..fb3ff54ae
> --- /dev/null
> +++ b/package/uhttpd/0002-Fix-TCP_FASTOPEN-related-compile-error.patch
> @@ -0,0 +1,30 @@
> +From adbab70d3602d77736781be344cfdc5508cb0600 Mon Sep 17 00:00:00 2001
> +From: Peter Seiderer <ps.report@gmx.net>
> +Date: Mon, 3 Apr 2017 19:22:30 +0200
> +Subject: [PATCH] Fix TCP_FASTOPEN related compile error.
> +
> +Signed-off-by: Peter Seiderer <ps.report@gmx.net>
> +---
> + listen.c | 6 ++++++
> + 1 file changed, 6 insertions(+)
> +
> +diff --git a/listen.c b/listen.c
> +index 2a54888..4dabe34 100644
> +--- a/listen.c
> ++++ b/listen.c
> +@@ -96,6 +96,12 @@ static void listener_cb(struct uloop_fd *fd, unsigned int events)
> + 		uh_block_listener(l);
> + }
> + 
> ++#ifdef linux

Why limit it to Linux? TCP_FASTOPEN does not conflict with anything else, as 
far as I can see.

> ++#ifndef TCP_FASTOPEN
> ++#define TCP_FASTOPEN 23
> ++#endif
> ++#endif

baruch

-- 
     http://baruch.siach.name/blog/                  ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - baruch at tkos.co.il - tel: +972.52.368.4656, http://www.tkos.co.il -

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Buildroot] [PATCH v2] uhttpd: fix TCP_FASTOPEN related compile error
  2017-04-03 17:36 ` Baruch Siach
@ 2017-04-03 17:48   ` Peter Seiderer
  2017-04-03 18:16     ` Baruch Siach
  0 siblings, 1 reply; 5+ messages in thread
From: Peter Seiderer @ 2017-04-03 17:48 UTC (permalink / raw)
  To: buildroot

Hello Baruch,

On Mon, 3 Apr 2017 20:36:46 +0300, Baruch Siach <baruch@tkos.co.il> wrote:

> Hi Peter,
> 
> On Mon, Apr 03, 2017 at 07:29:08PM +0200, Peter Seiderer wrote:
> > Fixes [1]:
> > 
> >   .../uhttpd-a8bf9c00842224edb394e79909053f7628ee6a82/listen.c: In function 'uh_setup_listeners':
> >   .../uhttpd-a8bf9c00842224edb394e79909053f7628ee6a82/listen.c:120:30: error: 'TCP_FASTOPEN' undeclared (first use in this function)
> > 
> > [1] http://autobuild.buildroot.net/results/56e/56e0727ccd1255b05e03d1b79dc238bd88701230
> > 
> > Signed-off-by: Peter Seiderer <ps.report@gmx.net>
> > ---
> > Changes v1 -> v2:
> >   - use conditional define for TCP_FASTOPEN (Baruch Siach, Thomas Petazzoni)
> >   - fix subject typo (Thomas Petazzoni)
> > ---
> >  ...02-Fix-TCP_FASTOPEN-related-compile-error.patch | 30 ++++++++++++++++++++++
> >  1 file changed, 30 insertions(+)
> >  create mode 100644 package/uhttpd/0002-Fix-TCP_FASTOPEN-related-compile-error.patch
> > 
> > diff --git a/package/uhttpd/0002-Fix-TCP_FASTOPEN-related-compile-error.patch b/package/uhttpd/0002-Fix-TCP_FASTOPEN-related-compile-error.patch
> > new file mode 100644
> > index 000000000..fb3ff54ae
> > --- /dev/null
> > +++ b/package/uhttpd/0002-Fix-TCP_FASTOPEN-related-compile-error.patch
> > @@ -0,0 +1,30 @@
> > +From adbab70d3602d77736781be344cfdc5508cb0600 Mon Sep 17 00:00:00 2001
> > +From: Peter Seiderer <ps.report@gmx.net>
> > +Date: Mon, 3 Apr 2017 19:22:30 +0200
> > +Subject: [PATCH] Fix TCP_FASTOPEN related compile error.
> > +
> > +Signed-off-by: Peter Seiderer <ps.report@gmx.net>
> > +---
> > + listen.c | 6 ++++++
> > + 1 file changed, 6 insertions(+)
> > +
> > +diff --git a/listen.c b/listen.c
> > +index 2a54888..4dabe34 100644
> > +--- a/listen.c
> > ++++ b/listen.c
> > +@@ -96,6 +96,12 @@ static void listener_cb(struct uloop_fd *fd, unsigned int events)
> > + 		uh_block_listener(l);
> > + }
> > + 
> > ++#ifdef linux
> 
> Why limit it to Linux? TCP_FASTOPEN does not conflict with anything else, as 
> far as I can see.

Because the setsockopt() call is limited by '#ifdef linux', see some lines below in
the original listen.c file...

Regards,
Peter


> 
> > ++#ifndef TCP_FASTOPEN
> > ++#define TCP_FASTOPEN 23
> > ++#endif
> > ++#endif
> 
> baruch
> 

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Buildroot] [PATCH v2] uhttpd: fix TCP_FASTOPEN related compile error
  2017-04-03 17:48   ` Peter Seiderer
@ 2017-04-03 18:16     ` Baruch Siach
  0 siblings, 0 replies; 5+ messages in thread
From: Baruch Siach @ 2017-04-03 18:16 UTC (permalink / raw)
  To: buildroot

Hi Peter,

On Mon, Apr 03, 2017 at 07:48:25PM +0200, Peter Seiderer wrote:
> On Mon, 3 Apr 2017 20:36:46 +0300, Baruch Siach <baruch@tkos.co.il> wrote:
> > On Mon, Apr 03, 2017 at 07:29:08PM +0200, Peter Seiderer wrote:
> > > ++#ifdef linux
> > 
> > Why limit it to Linux? TCP_FASTOPEN does not conflict with anything else, as 
> > far as I can see.
> 
> Because the setsockopt() call is limited by '#ifdef linux', see some lines below in
> the original listen.c file...

I'm aware of that. Still the TCP_FASTOPEN macro doesn't conflict with anything 
else, whether under #ifdef or not.

> > > ++#ifndef TCP_FASTOPEN
> > > ++#define TCP_FASTOPEN 23
> > > ++#endif
> > > ++#endif

baruch

-- 
     http://baruch.siach.name/blog/                  ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - baruch at tkos.co.il - tel: +972.52.368.4656, http://www.tkos.co.il -

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Buildroot] [PATCH v2] uhttpd: fix TCP_FASTOPEN related compile error
  2017-04-03 17:29 [Buildroot] [PATCH v2] uhttpd: fix TCP_FASTOPEN related compile error Peter Seiderer
  2017-04-03 17:36 ` Baruch Siach
@ 2017-04-03 19:19 ` Thomas Petazzoni
  1 sibling, 0 replies; 5+ messages in thread
From: Thomas Petazzoni @ 2017-04-03 19:19 UTC (permalink / raw)
  To: buildroot

Hello,

On Mon,  3 Apr 2017 19:29:08 +0200, Peter Seiderer wrote:
> Fixes [1]:
> 
>   .../uhttpd-a8bf9c00842224edb394e79909053f7628ee6a82/listen.c: In function 'uh_setup_listeners':
>   .../uhttpd-a8bf9c00842224edb394e79909053f7628ee6a82/listen.c:120:30: error: 'TCP_FASTOPEN' undeclared (first use in this function)
> 
> [1] http://autobuild.buildroot.net/results/56e/56e0727ccd1255b05e03d1b79dc238bd88701230
> 
> Signed-off-by: Peter Seiderer <ps.report@gmx.net>
> ---
> Changes v1 -> v2:
>   - use conditional define for TCP_FASTOPEN (Baruch Siach, Thomas Petazzoni)
>   - fix subject typo (Thomas Petazzoni)
> ---
>  ...02-Fix-TCP_FASTOPEN-related-compile-error.patch | 30 ++++++++++++++++++++++
>  1 file changed, 30 insertions(+)
>  create mode 100644 package/uhttpd/0002-Fix-TCP_FASTOPEN-related-compile-error.patch

Applied to master, thanks. Baruch: I read your comment about whether
the #ifndef TCP_FASTOPEN...#endif should be inside a #ifdef
linux...#endif condition or not. I believe there are arguments both
ways, so I'm not sure it's really worth to bikeshed on this too much.

Thanks!

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2017-04-03 19:19 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-03 17:29 [Buildroot] [PATCH v2] uhttpd: fix TCP_FASTOPEN related compile error Peter Seiderer
2017-04-03 17:36 ` Baruch Siach
2017-04-03 17:48   ` Peter Seiderer
2017-04-03 18:16     ` Baruch Siach
2017-04-03 19:19 ` Thomas Petazzoni

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.