diff options
author | Nick Mathewson <nickm@torproject.org> | 2007-08-08 05:14:03 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2007-08-08 05:14:03 +0000 |
commit | 50f5f6367854df38c7fa995aa778421b276177c1 (patch) | |
tree | d1e31352d031a230ca116cbbb4ad7f5822db2eac | |
parent | 9d2b1004b106b2ea8e4e3821c2f23c09562bdd54 (diff) | |
download | tor-50f5f6367854df38c7fa995aa778421b276177c1.tar.gz tor-50f5f6367854df38c7fa995aa778421b276177c1.zip |
r14091@catbus: nickm | 2007-08-08 01:13:17 -0400
Fix an annoying warning on OpenBSD: only include malloc.h if we are using it.
svn:r11059
-rw-r--r-- | src/common/util.c | 3 | ||||
-rw-r--r-- | src/common/util.h | 3 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/common/util.c b/src/common/util.c index 1e25e294a2..d22fce57a7 100644 --- a/src/common/util.c +++ b/src/common/util.c @@ -68,6 +68,9 @@ const char util_c_id[] = "$Id$"; #ifdef HAVE_TIME_H #include <time.h> #endif +#if defined(HAVE_MALLOC_H) && defined(HAVE_MALLINFO) +#include <malloc.h> +#endif #ifndef O_BINARY #define O_BINARY 0 diff --git a/src/common/util.h b/src/common/util.h index b0db03f149..4837c172db 100644 --- a/src/common/util.h +++ b/src/common/util.h @@ -23,9 +23,6 @@ #ifdef HAVE_TIME_H #include <time.h> #endif -#ifdef HAVE_MALLOC_H -#include <malloc.h> -#endif /* Replace assert() with a variant that sends failures to the log before * calling assert() normally. |