Skip to contentSkip to conversation

build: fix time.h related breakage on musl

PATCH Applied Milan P. Stanić 2 participants 2 messages Jun 6, 2022

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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(-)
ell/dhcp-transport.c +1 -0
index ef030de..c4cf0ca 100644
@@ -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"
ell/dhcp6-transport.c +1 -0
index 30c425f..5ff6516 100644
@@ -35,6 +35,7 @@
 #include <net/if.h>
 #include <unistd.h>
 #include <errno.h>
+#include <sys/time.h>
 
 #include "private.h"
 #include "missing.h"
ell/icmp6.c +1 -0
index 368977f..7319903 100644
@@ -36,6 +36,7 @@
 #include <net/if.h>
 #include <unistd.h>
 #include <errno.h>
+#include <sys/time.h>
 
 #include "private.h"
 #include "useful.h"
ell/time-private.h +1 -1
index 5295d94..83c23dd 100644
@@ -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);
ell/time.c +1 -0
index 10e10b0..41e5725 100644
@@ -26,6 +26,7 @@
 
 #define _GNU_SOURCE
 #include <time.h>
+#include <sys/time.h>
 
 #include "time.h"
 #include "time-private.h"
Signature · 1 line
2.36.1
#1 lore raw

Hi Milan,

Quoted 10 lines · Milan P. Stanić

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(-)

Applied, thanks!

Regards,
-Denis