[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[or-cvs] r11059: Fix an annoying warning on OpenBSD: only include malloc.h if (in tor/trunk: . src/common)



Author: nickm
Date: 2007-08-08 01:14:03 -0400 (Wed, 08 Aug 2007)
New Revision: 11059

Modified:
   tor/trunk/
   tor/trunk/src/common/util.c
   tor/trunk/src/common/util.h
Log:
 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.



Property changes on: tor/trunk
___________________________________________________________________
 svk:merge ticket from /tor/trunk [r14091] on 8246c3cf-6607-4228-993b-4d95d33730f1

Modified: tor/trunk/src/common/util.c
===================================================================
--- tor/trunk/src/common/util.c	2007-08-08 04:30:53 UTC (rev 11058)
+++ tor/trunk/src/common/util.c	2007-08-08 05:14:03 UTC (rev 11059)
@@ -68,6 +68,9 @@
 #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

Modified: tor/trunk/src/common/util.h
===================================================================
--- tor/trunk/src/common/util.h	2007-08-08 04:30:53 UTC (rev 11058)
+++ tor/trunk/src/common/util.h	2007-08-08 05:14:03 UTC (rev 11059)
@@ -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.