[or-cvs] r17190: {tor} Fix freebsd 7 compile by adding malloc_np.h header. Fix bug (in tor/trunk: . src/common)

nickm at seul.org nickm at seul.org
Wed Nov 5 15:56:54 UTC 2008


Author: nickm
Date: 2008-11-05 10:56:53 -0500 (Wed, 05 Nov 2008)
New Revision: 17190

Modified:
   tor/trunk/configure.in
   tor/trunk/src/common/util.c
Log:
Fix freebsd 7 compile by adding malloc_np.h header. Fix bug 850.

Modified: tor/trunk/configure.in
===================================================================
--- tor/trunk/configure.in	2008-11-05 10:40:29 UTC (rev 17189)
+++ tor/trunk/configure.in	2008-11-05 15:56:53 UTC (rev 17190)
@@ -324,7 +324,7 @@
 
 dnl These headers are not essential
 
-AC_CHECK_HEADERS(stdint.h sys/types.h inttypes.h sys/param.h sys/wait.h limits.h sys/limits.h netinet/in.h arpa/inet.h machine/limits.h syslog.h sys/time.h sys/resource.h inttypes.h utime.h sys/utime.h sys/mman.h netinet/in6.h malloc.h sys/syslimits.h malloc/malloc.h linux/types.h sys/file.h)
+AC_CHECK_HEADERS(stdint.h sys/types.h inttypes.h sys/param.h sys/wait.h limits.h sys/limits.h netinet/in.h arpa/inet.h machine/limits.h syslog.h sys/time.h sys/resource.h inttypes.h utime.h sys/utime.h sys/mman.h netinet/in6.h malloc.h sys/syslimits.h malloc/malloc.h linux/types.h sys/file.h malloc_np.h)
 
 TOR_CHECK_PROTOTYPE(malloc_good_size, HAVE_MALLOC_GOOD_SIZE_PROTOTYPE,
 [#ifdef HAVE_MALLOC_H

Modified: tor/trunk/src/common/util.c
===================================================================
--- tor/trunk/src/common/util.c	2008-11-05 10:40:29 UTC (rev 17189)
+++ tor/trunk/src/common/util.c	2008-11-05 15:56:53 UTC (rev 17190)
@@ -76,6 +76,9 @@
 #ifdef HAVE_MALLOC_H
 #include <malloc.h>
 #endif
+#ifdef HAVE_MALLOC_NP_H
+#include <malloc_np.h>
+#endif
 
 /* =====
  * Memory management



More information about the tor-commits mailing list