commit:     3e40af896261ebb411fb8b03d87af166a0b27326
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Thu Jun  9 04:22:31 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu Jun  9 04:22:36 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3e40af89

dev-libs/ell: backport musl build fix

Signed-off-by: Sam James <sam <AT> gentoo.org>

 dev-libs/ell/ell-0.51.ebuild                      |  4 ++
 dev-libs/ell/files/ell-0.51-musl-build-time.patch | 60 +++++++++++++++++++++++
 2 files changed, 64 insertions(+)

diff --git a/dev-libs/ell/ell-0.51.ebuild b/dev-libs/ell/ell-0.51.ebuild
index 56c48e4f83d1..f7963d87ac96 100644
--- a/dev-libs/ell/ell-0.51.ebuild
+++ b/dev-libs/ell/ell-0.51.ebuild
@@ -33,6 +33,10 @@ CONFIG_CHECK="
        ~KEY_DH_OPERATIONS
 "
 
+PATCHES=(
+       "${FILESDIR}"/${P}-musl-build-time.patch
+)
+
 src_prepare() {
        default
        [[ "${PV}" == *9999 ]] && eautoreconf

diff --git a/dev-libs/ell/files/ell-0.51-musl-build-time.patch 
b/dev-libs/ell/files/ell-0.51-musl-build-time.patch
new file mode 100644
index 000000000000..201bc7994406
--- /dev/null
+++ b/dev-libs/ell/files/ell-0.51-musl-build-time.patch
@@ -0,0 +1,60 @@
+https://git.kernel.org/pub/scm/libs/ell/ell.git/commit/?id=ce7fcfe194f0abcb8f419f83276b16a4ab274032
+
+From: "Milan P. Stanić" <m...@arvanta.net>
+Date: Mon, 6 Jun 2022 22:05:39 +0200
+Subject: build: fix time.h related breakage on musl
+
+missing time.h for struct timeval usage
+forward declaration of struct timeval in time-private.h
+--- 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"
+--- 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"
+--- 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"
+--- 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);
+--- 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"
+cgit 

Reply via email to