Index: libffi/ChangeLog
===================================================================
--- libffi.orig/ChangeLog
+++ libffi/ChangeLog
@@ -33,6 +33,11 @@
 
 	* configure: Regenerate.
 
+2011-02-08  Oren Held  <orenhe@il.ibm.com>
+
+	* src/dlmalloc.c (_STRUCT_MALLINFO): Define in order to avoid
+	redefinition of mallinfo on HP-UX.
+
 2011-02-08  Ginn Chen  <ginn.chen@oracle.com>
 
 	* src/sparc/ffi.c (ffi_call): Make compatible with Solaris Studio
Index: libffi/src/dlmalloc.c
===================================================================
--- libffi.orig/src/dlmalloc.c
+++ libffi/src/dlmalloc.c
@@ -622,6 +622,9 @@ DEFAULT_MMAP_THRESHOLD       default: 25
 #include "/usr/include/malloc.h"
 #else /* HAVE_USR_INCLUDE_MALLOC_H */
 
+/* HP-UX's stdlib.h redefines mallinfo unless _STRUCT_MALLINFO is defined */
+#define _STRUCT_MALLINFO
+
 struct mallinfo {
   MALLINFO_FIELD_TYPE arena;    /* non-mmapped space allocated from system */
   MALLINFO_FIELD_TYPE ordblks;  /* number of free chunks */
