summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Orlitzky <mjo@gentoo.org>2024-02-03 11:57:34 -0500
committerMichael Orlitzky <mjo@gentoo.org>2024-02-03 11:57:34 -0500
commite4bedabe7945ed0b58b3ed67294a246d27698d7c (patch)
treecaef8ec225f7deda103a76649d7e60e37c241c6d
parentapp-metrics/go-carbon-0.17.3: version bump (diff)
downloadgentoo-e4bedabe7945ed0b58b3ed67294a246d27698d7c.tar.gz
gentoo-e4bedabe7945ed0b58b3ed67294a246d27698d7c.tar.bz2
gentoo-e4bedabe7945ed0b58b3ed67294a246d27698d7c.zip
net-libs/libdom: fix the build with musl
Closes: https://bugs.gentoo.org/923647 Signed-off-by: Michael Orlitzky <mjo@gentoo.org>
-rw-r--r--net-libs/libdom/files/libdom-0.4.2-musl.patch29
-rw-r--r--net-libs/libdom/libdom-0.4.2.ebuild2
2 files changed, 31 insertions, 0 deletions
diff --git a/net-libs/libdom/files/libdom-0.4.2-musl.patch b/net-libs/libdom/files/libdom-0.4.2-musl.patch
new file mode 100644
index 000000000000..61a84d3293b4
--- /dev/null
+++ b/net-libs/libdom/files/libdom-0.4.2-musl.patch
@@ -0,0 +1,29 @@
+From 15898de03539ad2376cca591c39c60134a7d4a12 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky <michael@orlitzky.com>
+Date: Sat, 3 Feb 2024 08:05:34 -0500
+Subject: [PATCH 1/1] bindings/xml/libxml_xmlparser.c: add stdlib.h include
+
+This file uses malloc() but does not include stdlib.h directly. With
+glibc, that apparently works out just fine... but with musl, it leads
+to implicit declaration warnings/errors, most likely because musl does
+not include stdlib.h transitively via any of the other headers used by
+this file.
+---
+ bindings/xml/libxml_xmlparser.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/bindings/xml/libxml_xmlparser.c b/bindings/xml/libxml_xmlparser.c
+index e4a6d80..28aadf1 100644
+--- a/bindings/xml/libxml_xmlparser.c
++++ b/bindings/xml/libxml_xmlparser.c
+@@ -6,6 +6,7 @@
+ */
+
+ #include <stdbool.h>
++#include <stdlib.h>
+ #include <string.h>
+ #include <assert.h>
+
+--
+2.43.0
+
diff --git a/net-libs/libdom/libdom-0.4.2.ebuild b/net-libs/libdom/libdom-0.4.2.ebuild
index 547bc6cbbf23..ac1c7fd3df91 100644
--- a/net-libs/libdom/libdom-0.4.2.ebuild
+++ b/net-libs/libdom/libdom-0.4.2.ebuild
@@ -36,6 +36,8 @@ BDEPEND="
REQUIRED_USE="test? ( xml )"
+PATCHES=( "${FILESDIR}/libdom-0.4.2-musl.patch" )
+
_emake() {
netsurf_define_makeconf
emake "${NETSURF_MAKECONF[@]}" COMPONENT_TYPE=lib-shared \