Browse Source

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

Nick Mathewson 17 years ago
parent
commit
50f5f63678
2 changed files with 3 additions and 3 deletions
  1. 3 0
      src/common/util.c
  2. 0 3
      src/common/util.h

+ 3 - 0
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

+ 0 - 3
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.