($INBOX_DIR/description missing)
 help / color / mirror / Atom feed
From: "Milan P. Stanić" <mps@arvanta.net>
To: ell@lists.linux.dev
Cc: "Milan P. Stanić" <mps@arvanta.net>
Subject: [PATCH] build: fix time.h related breakage on musl
Date: Mon,  6 Jun 2022 22:05:39 +0200	[thread overview]
Message-ID: <20220606200539.28575-1-mps@arvanta.net> (raw)

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


             reply	other threads:[~2022-06-06 20:11 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-06 20:05 Milan P. Stanić [this message]
2022-06-06 20:26 ` [PATCH] build: fix time.h related breakage on musl Denis Kenzior

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220606200539.28575-1-mps@arvanta.net \
    --to=mps@arvanta.net \
    --cc=ell@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).