package/libroxml: fix musl build errors
Fixes:
https://autobuild.buildroot.net/results/0ff/0ff4394319d2014884328c347ef495da327a562e/
Added Upstream tag to patch 0001.
Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
(cherry picked from commit 1f973844d1)
Signed-off-by: Thomas Perale <thomas.perale@mind.be>
This commit is contained in:
committed by
Thomas Perale
parent
0c2f8b1cab
commit
7fa84318c8
@@ -637,7 +637,6 @@ package/libp11/0001-src-p11_attr.c-fix-build-with-gcc-4.8.patch lib_patch.Upstre
|
||||
package/libplatform/0001-cmake-require-c-11-as-the-minimum-standard.patch lib_patch.Upstream
|
||||
package/libpthsem/0001-fix-build-on-linux-3.x-host.patch lib_patch.Upstream
|
||||
package/libressl/0001-always-expose-SSL_OP_NO_TLSv1_3.patch lib_patch.Upstream
|
||||
package/libroxml/0001-src-roxml_mem.h-add-missing-extern.patch lib_patch.Upstream
|
||||
package/librsvg/0001-gdk-pixbuf-loader-Makefile.am-set-GDK_PIXBUF_MODULED.patch lib_patch.Upstream
|
||||
package/librtlsdr/0001-Makefile.am-respect-DESTDIR-with-install-udev-rules.patch lib_patch.Upstream
|
||||
package/libselinux/0001-Do-not-use-PYCEXT-and-rely-on-the-installed-file-nam.patch lib_patch.Upstream
|
||||
|
||||
@@ -13,8 +13,9 @@ libtool: link: /home/peko/autobuild/instance-0/output-1/host/bin/arm-buildroot-l
|
||||
Fixes:
|
||||
- http://autobuild.buildroot.org/results/b6ac3664d61ad826515b57c4d057b6f001b5167d
|
||||
|
||||
Upstream: https://github.com/blunderer/libroxml/commit/34257124eefe0ca095ed54681c818381070ed549
|
||||
|
||||
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
|
||||
[Upstream status: https://github.com/blunderer/libroxml/pull/79]
|
||||
---
|
||||
src/roxml_mem.h | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
69
package/libroxml/0002-Fix-musl-build-errors.patch
Normal file
69
package/libroxml/0002-Fix-musl-build-errors.patch
Normal file
@@ -0,0 +1,69 @@
|
||||
From abf4404c6c0213666f3fce73cff6e51435eac923 Mon Sep 17 00:00:00 2001
|
||||
From: Bernd Kuhls <bernd@kuhls.net>
|
||||
Date: Sat, 15 Nov 2025 12:29:33 +0100
|
||||
Subject: [PATCH] Fix musl build errors
|
||||
|
||||
src/roxml_cat.c: In function 'display_usage':
|
||||
src/roxml_cat.c:21:22: error: implicit declaration of function 'basename'; did you mean 'rename'? [-Wimplicit-function-declaration]
|
||||
21 | char *name = basename(prgname);
|
||||
| ^~~~~~~~
|
||||
| rename
|
||||
src/roxml_cat.c:21:22: error: initialization of 'char *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
|
||||
|
||||
src/roxml_mem.c: In function 'roxml_malloc':
|
||||
src/roxml_mem.c:138:18: error: assignment to 'long unsigned int' from 'pthread_t' {aka 'struct __pthread *'} makes integer from pointer without a cast [-Wint-conversion]
|
||||
138 | cell->id = pthread_self();
|
||||
|
||||
src/roxml_utils.h:51:16: error: returning 'pthread_t' {aka 'struct __pthread *'} from a function with return type 'long unsigned int' makes integer from pointer without a cast [-Wint-conversion]
|
||||
51 | return pthread_self();
|
||||
|
||||
Upstream: https://github.com/blunderer/libroxml/pull/86
|
||||
|
||||
Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
|
||||
---
|
||||
src/roxml_cat.c | 1 +
|
||||
src/roxml_mem.c | 2 +-
|
||||
src/roxml_utils.h | 2 +-
|
||||
3 files changed, 3 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/roxml_cat.c b/src/roxml_cat.c
|
||||
index 11e42d9..4320efd 100644
|
||||
--- a/src/roxml_cat.c
|
||||
+++ b/src/roxml_cat.c
|
||||
@@ -5,6 +5,7 @@
|
||||
#include <getopt.h>
|
||||
#include <string.h>
|
||||
#include <errno.h>
|
||||
+#include <libgen.h>
|
||||
#include "roxml.h"
|
||||
|
||||
static struct option long_options[] =
|
||||
diff --git a/src/roxml_mem.c b/src/roxml_mem.c
|
||||
index 91b5db2..bf757bb 100644
|
||||
--- a/src/roxml_mem.c
|
||||
+++ b/src/roxml_mem.c
|
||||
@@ -135,7 +135,7 @@ ROXML_INT void *roxml_malloc(int size, int num, int type)
|
||||
cell->next->prev = cell;
|
||||
cell = cell->next;
|
||||
cell->type = type;
|
||||
- cell->id = pthread_self();
|
||||
+ cell->id = (unsigned long)pthread_self();
|
||||
cell->occ = size;
|
||||
cell->ptr = calloc(num, size);
|
||||
head_cell.prev = cell;
|
||||
diff --git a/src/roxml_utils.h b/src/roxml_utils.h
|
||||
index 3f50976..f5fc582 100644
|
||||
--- a/src/roxml_utils.h
|
||||
+++ b/src/roxml_utils.h
|
||||
@@ -48,7 +48,7 @@ ROXML_STATIC_INLINE ROXML_INT int roxml_unlock(node_t *n)
|
||||
#else /* CONFIG_XML_THREAD_SAFE==1 */
|
||||
ROXML_STATIC_INLINE ROXML_INT unsigned long int roxml_thread_id(node_t *n)
|
||||
{
|
||||
- return pthread_self();
|
||||
+ return (unsigned long)pthread_self();
|
||||
}
|
||||
|
||||
ROXML_STATIC_INLINE ROXML_INT int roxml_lock_init(node_t *n)
|
||||
--
|
||||
2.47.3
|
||||
|
||||
Reference in New Issue
Block a user