aboutsummaryrefslogtreecommitdiff
path: root/dbus/iwd/patches/0001-build-fix-time.h-related-breakage-on-musl.patch
blob: 7da5c28f160a0072531125fc04b5ce7ae1fd8aa3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
From 0cee9267ef95b3a13917e042dc205bc24be9328e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Milan=20P=2E=20Stani=C4=87?= <mps@arvanta.net>
Date: Mon, 6 Jun 2022 17:05:48 +0000
Subject: [PATCH] build: fix time.h related breakage on musl

missing time.h for struct timeval usage
forward declaration of struct timeval in time-private.h
---
 ell/dhcp-transport.c  | 1 +
 ell/dhcp6-transport.c | 1 +
 ell/icmp6.c           | 1 +
 ell/time-private.h    | 2 +-
 ell/time.c            | 1 +
 5 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/ell/dhcp-transport.c b/ell/dhcp-transport.c
index ef030de..c4cf0ca 100644
--- a/ell/dhcp-transport.c
+++ b/ell/dhcp-transport.c
@@ -40,6 +40,7 @@
 #include <linux/filter.h>
 #include <net/if_arp.h>
 #include <errno.h>
+#include <sys/time.h>
 
 #include "io.h"
 #include "util.h"
diff --git a/ell/dhcp6-transport.c b/ell/dhcp6-transport.c
index 30c425f..5ff6516 100644
--- a/ell/dhcp6-transport.c
+++ b/ell/dhcp6-transport.c
@@ -35,6 +35,7 @@
 #include <net/if.h>
 #include <unistd.h>
 #include <errno.h>
+#include <sys/time.h>
 
 #include "private.h"
 #include "missing.h"
diff --git a/ell/icmp6.c b/ell/icmp6.c
index 368977f..7319903 100644
--- a/ell/icmp6.c
+++ b/ell/icmp6.c
@@ -36,6 +36,7 @@
 #include <net/if.h>
 #include <unistd.h>
 #include <errno.h>
+#include <sys/time.h>
 
 #include "private.h"
 #include "useful.h"
diff --git a/ell/time-private.h b/ell/time-private.h
index 5295d94..83c23dd 100644
--- a/ell/time-private.h
+++ b/ell/time-private.h
@@ -19,7 +19,7 @@
  *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
  *
  */
-
+struct timeval;
 uint64_t _time_pick_interval_secs(uint32_t min_secs, uint32_t max_secs);
 uint64_t _time_fuzz_msecs(uint64_t ms);
 uint64_t _time_fuzz_secs(uint32_t secs, uint32_t max_offset);
diff --git a/ell/time.c b/ell/time.c
index 10e10b0..41e5725 100644
--- a/ell/time.c
+++ b/ell/time.c
@@ -26,6 +26,7 @@
 
 #define _GNU_SOURCE
 #include <time.h>
+#include <sys/time.h>
 
 #include "time.h"
 #include "time-private.h"
-- 
2.36.1