libroxml: fix compilation with GCC14
Need casts for integer conversion Signed-off-by: Rosen Penev <rosenp@gmail.com>
This commit is contained in:
parent
206752dd9c
commit
d5f9a76aa4
|
@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
|
|||
|
||||
PKG_NAME:=libroxml
|
||||
PKG_VERSION:=3.0.2
|
||||
PKG_RELEASE:=2
|
||||
PKG_RELEASE:=3
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=http://download.libroxml.net/pool/v3.x
|
||||
|
|
|
@ -0,0 +1,31 @@
|
|||
--- a/src/roxml_mem.c
|
||||
+++ b/src/roxml_mem.c
|
||||
@@ -20,7 +20,7 @@ ROXML_STATIC ROXML_INT inline void roxml
|
||||
memory_cell_t *ptr = &head_cell;
|
||||
memory_cell_t *to_delete = NULL;
|
||||
|
||||
- while ((ptr->prev != NULL) && (ptr->prev->id != pthread_self()))
|
||||
+ while ((ptr->prev != NULL) && (ptr->prev->id != (unsigned long int)pthread_self()))
|
||||
ptr = ptr->prev;
|
||||
|
||||
if (ptr->prev == NULL)
|
||||
@@ -135,7 +135,7 @@ ROXML_INT void *roxml_malloc(int size, i
|
||||
cell->next->prev = cell;
|
||||
cell = cell->next;
|
||||
cell->type = type;
|
||||
- cell->id = pthread_self();
|
||||
+ cell->id = (unsigned long int)pthread_self();
|
||||
cell->occ = size;
|
||||
cell->ptr = calloc(num, size);
|
||||
head_cell.prev = cell;
|
||||
--- a/src/roxml_utils.h
|
||||
+++ b/src/roxml_utils.h
|
||||
@@ -48,7 +48,7 @@ ROXML_STATIC_INLINE ROXML_INT int roxml_
|
||||
#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 int)pthread_self();
|
||||
}
|
||||
|
||||
ROXML_STATIC_INLINE ROXML_INT int roxml_lock_init(node_t *n)
|
Loading…
Reference in New Issue