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 #include #include +#include #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)