blob: 02b5a9f21ef83215a0d3f0b9a3b5d9513da9e131 [file] [log] [blame]
Andrew Geissler615f2f12022-07-15 14:00:58 -05001From cd9513a025174181b66ac13de45813f6e15727d3 Mon Sep 17 00:00:00 2001
2From: =?UTF-8?q?Milan=20P=2E=20Stani=C4=87?= <mps@arvanta.net>
3Date: Mon, 6 Jun 2022 22:05:39 +0200
4Subject: [PATCH] build: fix time.h related breakage on musl
5
6missing time.h for struct timeval usage
7forward declaration of struct timeval in time-private.h
8
9Upstream-Status: Backport
10Signed-off-by: Alexander Kanavin <alex@linutronix.de>
11---
12 ell/dhcp-transport.c | 1 +
13 ell/dhcp6-transport.c | 1 +
14 ell/icmp6.c | 1 +
15 ell/time-private.h | 2 +-
16 ell/time.c | 1 +
17 5 files changed, 5 insertions(+), 1 deletion(-)
18
19diff --git a/ell/dhcp-transport.c b/ell/dhcp-transport.c
20index ef030de..c4cf0ca 100644
21--- a/ell/dhcp-transport.c
22+++ b/ell/dhcp-transport.c
23@@ -40,6 +40,7 @@
24 #include <linux/filter.h>
25 #include <net/if_arp.h>
26 #include <errno.h>
27+#include <sys/time.h>
28
29 #include "io.h"
30 #include "util.h"
31diff --git a/ell/dhcp6-transport.c b/ell/dhcp6-transport.c
32index 30c425f..5ff6516 100644
33--- a/ell/dhcp6-transport.c
34+++ b/ell/dhcp6-transport.c
35@@ -35,6 +35,7 @@
36 #include <net/if.h>
37 #include <unistd.h>
38 #include <errno.h>
39+#include <sys/time.h>
40
41 #include "private.h"
42 #include "missing.h"
43diff --git a/ell/icmp6.c b/ell/icmp6.c
44index 368977f..7319903 100644
45--- a/ell/icmp6.c
46+++ b/ell/icmp6.c
47@@ -36,6 +36,7 @@
48 #include <net/if.h>
49 #include <unistd.h>
50 #include <errno.h>
51+#include <sys/time.h>
52
53 #include "private.h"
54 #include "useful.h"
55diff --git a/ell/time-private.h b/ell/time-private.h
56index 5295d94..83c23dd 100644
57--- a/ell/time-private.h
58+++ b/ell/time-private.h
59@@ -19,7 +19,7 @@
60 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
61 *
62 */
63-
64+struct timeval;
65 uint64_t _time_pick_interval_secs(uint32_t min_secs, uint32_t max_secs);
66 uint64_t _time_fuzz_msecs(uint64_t ms);
67 uint64_t _time_fuzz_secs(uint32_t secs, uint32_t max_offset);
68diff --git a/ell/time.c b/ell/time.c
69index 10e10b0..41e5725 100644
70--- a/ell/time.c
71+++ b/ell/time.c
72@@ -26,6 +26,7 @@
73
74 #define _GNU_SOURCE
75 #include <time.h>
76+#include <sys/time.h>
77
78 #include "time.h"
79 #include "time-private.h"