Skip to contentSkip to conversation

package/libuhttpd: fix build without dlopen

PATCH New Fabrice Fontaine 2 participants 3 messages Oct 25, 2020 – Oct 26, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/libuhttpd: fix build without dlopen

Fix build of libuhttpd in version 3.4.0 without dlopen

Fixes:
- http://autobuild.buildroot.org/results/b2bbd0681705b94e6b531996b39f62e47f089c92

---
 ...rc-uhttpd.c-fix-build-without-dlopen.patch | 35 +++++++++++++++++++
 1 file changed, 35 insertions(+)
 create mode 100644 package/libuhttpd/0001-src-uhttpd.c-fix-build-without-dlopen.patch
package/libuhttpd/0001-src-uhttpd.c-fix-build-without-dlopen.patch new file +35 -0
new file mode 100644
index 0000000000..966041028b
@@ -0,0 +1,35 @@
+From 0b2058e7c96a3d8d994d572116ad7b950766347b Mon Sep 17 00:00:00 2001
+From: Fabrice Fontaine <[email protected]>
+Date: Fri, 16 Oct 2020 21:39:47 +0200
+Subject: [PATCH] src/uhttpd.c: fix build without dlopen
+
+Build without dlopen fails on:
+
+/data/buildroot-test/instance-0/output-1/build/libuhttpd-3.4.0/src/uhttpd.c:45:23: error: unused variable 'p' [-Werror=unused-variable]
+     struct uh_plugin *p = srv->plugins;
+                       ^
+
+Fixes:
+ - http://autobuild.buildroot.org/results/b2bbd0681705b94e6b531996b39f62e47f089c92
+
+Signed-off-by: Fabrice Fontaine <[email protected]>
+[Retrieved from:
+https://github.com/zhaojh329/libuhttpd/commit/0b2058e7c96a3d8d994d572116ad7b950766347b]
+---
+ src/uhttpd.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/src/uhttpd.c b/src/uhttpd.c
+index dad3646..a37c136 100644
+--- a/src/uhttpd.c
++++ b/src/uhttpd.c
+@@ -42,7 +42,9 @@ void conn_free(struct uh_connection *conn);
+ static void uh_server_free(struct uh_server *srv)
+ {
+     struct uh_connection *conn = srv->conns;
++#ifdef HAVE_DLOPEN
+     struct uh_plugin *p = srv->plugins;
++#endif
+ 
+     ev_io_stop(srv->loop, &srv->ior);
+ 
Signature · 1 line
2.28.0
#1 lore raw

PATCH 1/1 package/libuhttpd: fix build without dlopen

Fabrice, All,

On 2020-10-25 17:43 +0100, Fabrice Fontaine spake thusly:

Quoted 6 lines

Fix build of libuhttpd in version 3.4.0 without dlopen

Fixes:
- http://autobuild.buildroot.org/results/b2bbd0681705b94e6b531996b39f62e47f089c92

Applied to master, thanks.

See below for an additional comment...

Quoted 11 lines
---
 ...rc-uhttpd.c-fix-build-without-dlopen.patch | 35 +++++++++++++++++++
 1 file changed, 35 insertions(+)
 create mode 100644 package/libuhttpd/0001-src-uhttpd.c-fix-build-without-dlopen.patch
package/libuhttpd/0001-src-uhttpd.c-fix-build-without-dlopen.patch new file +0 -0
new file mode 100644
index 0000000000..966041028b

package/libuhttpd/0001-src-uhttpd.c-fix-build-without-dlopen.patch line 10

Quoted 10 lines
package/libuhttpd/0001-src-uhttpd.c-fix-build-without-dlopen.patch new file +10 -0
@@ -0,0 +1,35 @@
+From 0b2058e7c96a3d8d994d572116ad7b950766347b Mon Sep 17 00:00:00 2001
+From: Fabrice Fontaine <[email protected]>
+Date: Fri, 16 Oct 2020 21:39:47 +0200
+Subject: [PATCH] src/uhttpd.c: fix build without dlopen
+
+Build without dlopen fails on:
+
+/data/buildroot-test/instance-0/output-1/build/libuhttpd-3.4.0/src/uhttpd.c:45:23: error: unused variable 'p' [-Werror=unused-variable]
+     struct uh_plugin *p = srv->plugins;
+                       ^

Ideally, we'd like to be able to build with -Werror. Do you think you could see with upstream so that they at least add an option to disable it?

Regards,
Yann E. MORIN.

Quoted 31 lines
package/libuhttpd/0001-src-uhttpd.c-fix-build-without-dlopen.patch new file +24 -0
+Fixes:
+ - http://autobuild.buildroot.org/results/b2bbd0681705b94e6b531996b39f62e47f089c92
+
+Signed-off-by: Fabrice Fontaine <[email protected]>
+[Retrieved from:
+https://github.com/zhaojh329/libuhttpd/commit/0b2058e7c96a3d8d994d572116ad7b950766347b]
+---
+ src/uhttpd.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/src/uhttpd.c b/src/uhttpd.c
+index dad3646..a37c136 100644
+--- a/src/uhttpd.c
++++ b/src/uhttpd.c
+@@ -42,7 +42,9 @@ void conn_free(struct uh_connection *conn);
+ static void uh_server_free(struct uh_server *srv)
+ {
+     struct uh_connection *conn = srv->conns;
++#ifdef HAVE_DLOPEN
+     struct uh_plugin *p = srv->plugins;
++#endif
+ 
+     ev_io_stop(srv->loop, &srv->ior);
+ 
Signature · 6 lines
2.28.0

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#2 lore raw

PATCH 1/1 package/libuhttpd: fix build without dlopen

Hi Yann,

Le lun. 26 oct. 2020 ? 08:26, Yann E. MORIN <[email protected]> a ?crit :

Quoted 32 lines

Fabrice, All,

On 2020-10-25 17:43 +0100, Fabrice Fontaine spake thusly:

Quoted 6 lines

Fix build of libuhttpd in version 3.4.0 without dlopen

Fixes:
- http://autobuild.buildroot.org/results/b2bbd0681705b94e6b531996b39f62e47f089c92

Applied to master, thanks.

See below for an additional comment...

Quoted 17 lines
---
 ...rc-uhttpd.c-fix-build-without-dlopen.patch | 35 +++++++++++++++++++
 1 file changed, 35 insertions(+)
 create mode 100644 package/libuhttpd/0001-src-uhttpd.c-fix-build-without-dlopen.patch
package/libuhttpd/0001-src-uhttpd.c-fix-build-without-dlopen.patch new file +6 -0
new file mode 100644
index 0000000000..966041028b
@@ -0,0 +1,35 @@
+From 0b2058e7c96a3d8d994d572116ad7b950766347b Mon Sep 17 00:00:00 2001
+From: Fabrice Fontaine <[email protected]>
+Date: Fri, 16 Oct 2020 21:39:47 +0200
+Subject: [PATCH] src/uhttpd.c: fix build without dlopen
+
+Build without dlopen fails on:
Quoted 8 lines

package/libuhttpd/0001-src-uhttpd.c-fix-build-without-dlopen.patch line 10

Quoted 4 lines
package/libuhttpd/0001-src-uhttpd.c-fix-build-without-dlopen.patch new file +4 -0
+
+/data/buildroot-test/instance-0/output-1/build/libuhttpd-3.4.0/src/uhttpd.c:45:23: error: unused variable 'p' [-Werror=unused-variable]
+     struct uh_plugin *p = srv->plugins;
+                       ^

Ideally, we'd like to be able to build with -Werror. Do you think you could see with upstream so that they at least add an option to disable it?

I opened a merge request here: https://github.com/zhaojh329/libuhttpd/pull/12.

Quoted 38 lines

Regards,
Yann E. MORIN.

Quoted 27 lines
package/libuhttpd/0001-src-uhttpd.c-fix-build-without-dlopen.patch new file +24 -1
+Fixes:
+ - http://autobuild.buildroot.org/results/b2bbd0681705b94e6b531996b39f62e47f089c92
+
+Signed-off-by: Fabrice Fontaine <[email protected]>
+[Retrieved from:
+https://github.com/zhaojh329/libuhttpd/commit/0b2058e7c96a3d8d994d572116ad7b950766347b]
+---
+ src/uhttpd.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/src/uhttpd.c b/src/uhttpd.c
+index dad3646..a37c136 100644
+--- a/src/uhttpd.c
++++ b/src/uhttpd.c
+@@ -42,7 +42,9 @@ void conn_free(struct uh_connection *conn);
+ static void uh_server_free(struct uh_server *srv)
+ {
+     struct uh_connection *conn = srv->conns;
++#ifdef HAVE_DLOPEN
+     struct uh_plugin *p = srv->plugins;
++#endif
+
+     ev_io_stop(srv->loop, &srv->ior);
+
--

2.28.0

Quoted 4 lines

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot

--
.-----------------.--------------------.------------------.--------------------.

Quoted 5 lines
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |

'------------------------------^-------^------------------^--------------------'

Best Regards,

Fabrice