Without the correct prototype for malloc() brought in from stdlib.h, the compiler assumes the result is an integer not a pointer. On 64-bit arch this causes pointer truncation. $OpenBSD: patch-xmlmemory_h,v 1.1 2008/07/14 20:42:41 sthen Exp $ --- xmlmemory.h.orig Mon Jul 14 11:32:42 2008 +++ xmlmemory.h Mon Jul 14 11:32:54 2008 @@ -14,6 +14,9 @@ #ifdef HAVE_MALLOC_H #include #endif +#ifdef HAVE_STDLIB_H +#include +#endif #define xmlFree(x) free((x)) #define xmlMalloc(x) malloc(x)