diff mbox series

[1/1] package/ser2net: fix build on musl

Message ID 20200926104548.287620-1-fontaine.fabrice@gmail.com
State Accepted
Headers show
Series [1/1] package/ser2net: fix build on musl | expand

Commit Message

Fabrice Fontaine Sept. 26, 2020, 10:45 a.m. UTC
Build on musl fails since version 4.2.2 and
https://github.com/cminyard/ser2net/commit/1703ddf5231caf08c7bb2c14a845bc2dd602159f

Fixes:
 - http://autobuild.buildroot.org/results/4c0b238186cb2fb2d81807ce006945594f92b2cd

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
 .../0001-port.h-include-sys-time.h.patch      | 39 +++++++++++++++++++
 1 file changed, 39 insertions(+)
 create mode 100644 package/ser2net/0001-port.h-include-sys-time.h.patch

Comments

Thomas Petazzoni Sept. 26, 2020, 1:40 p.m. UTC | #1
On Sat, 26 Sep 2020 12:45:48 +0200
Fabrice Fontaine <fontaine.fabrice@gmail.com> wrote:

> Build on musl fails since version 4.2.2 and
> https://github.com/cminyard/ser2net/commit/1703ddf5231caf08c7bb2c14a845bc2dd602159f
> 
> Fixes:
>  - http://autobuild.buildroot.org/results/4c0b238186cb2fb2d81807ce006945594f92b2cd
> 
> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> ---
>  .../0001-port.h-include-sys-time.h.patch      | 39 +++++++++++++++++++
>  1 file changed, 39 insertions(+)
>  create mode 100644 package/ser2net/0001-port.h-include-sys-time.h.patch

Applied to master, thanks.

Thomas
diff mbox series

Patch

diff --git a/package/ser2net/0001-port.h-include-sys-time.h.patch b/package/ser2net/0001-port.h-include-sys-time.h.patch
new file mode 100644
index 0000000000..daf5372437
--- /dev/null
+++ b/package/ser2net/0001-port.h-include-sys-time.h.patch
@@ -0,0 +1,39 @@ 
+From 021543b02b6fdb78c9217757736eabac90a647eb Mon Sep 17 00:00:00 2001
+From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+Date: Sat, 26 Sep 2020 12:37:38 +0200
+Subject: [PATCH] port.h: include <sys/time.h>
+
+Include <sys/time.h> to avoid the following build failure on musl:
+
+port.h:361:29: warning: 'struct timeval' declared inside parameter list will not be visible outside of this definition or declaration
+     const char *str, struct timeval *tv,
+                             ^~~~~~~
+portconfig.c: In function 'myconfig':
+portconfig.c:586:9: error: variable 'tv' has initializer but incomplete type
+  struct timeval tv = { 0, 0 };
+         ^~~~~~~
+
+Fixes:
+ - http://autobuild.buildroot.org/results/4c0b238186cb2fb2d81807ce006945594f92b2cd
+
+Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+[Upstream status: https://github.com/cminyard/ser2net/pull/34]
+---
+ port.h | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/port.h b/port.h
+index 048c5bd..86c3b1d 100644
+--- a/port.h
++++ b/port.h
+@@ -9,6 +9,7 @@
+ #define PORT
+ 
+ #include <netdb.h>
++#include <sys/time.h>
+ #include "gbuf.h"
+ #include "absout.h"
+ 
+-- 
+2.28.0
+