summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2008-11-05 15:56:53 +0000
committerNick Mathewson <nickm@torproject.org>2008-11-05 15:56:53 +0000
commitb56d1545db0c73431f75ec08412a9a6f0e087732 (patch)
tree14d6334671e4cd29d15568c073b5bac924b2f89b
parentb31e2c2491951c10e1e53d4d0cc32a3ac728e279 (diff)
downloadtor-b56d1545db0c73431f75ec08412a9a6f0e087732.tar.gz
tor-b56d1545db0c73431f75ec08412a9a6f0e087732.zip
Fix freebsd 7 compile by adding malloc_np.h header. Fix bug 850.
svn:r17190
-rw-r--r--configure.in2
-rw-r--r--src/common/util.c3
2 files changed, 4 insertions, 1 deletions
diff --git a/configure.in b/configure.in
index 7ec88e983a..d383a627a1 100644
--- a/configure.in
+++ b/configure.in
@@ -324,7 +324,7 @@ AC_CHECK_HEADERS(netdb.h sys/ioctl.h sys/socket.h arpa/inet.h netinet/in.h pwd.h
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
diff --git a/src/common/util.c b/src/common/util.c
index dc15c6b03a..640239f972 100644
--- a/src/common/util.c
+++ b/src/common/util.c
@@ -76,6 +76,9 @@ const char util_c_id[] = "$Id$";
#ifdef HAVE_MALLOC_H
#include <malloc.h>
#endif
+#ifdef HAVE_MALLOC_NP_H
+#include <malloc_np.h>
+#endif
/* =====
* Memory management