diff options
author | Nick Mathewson <nickm@torproject.org> | 2009-01-04 22:47:42 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2009-01-04 22:47:42 +0000 |
commit | 743c6c827778533fcbd7b3075311dc5c547b9846 (patch) | |
tree | 3547d116e7842696c9cb3aa19d09225e1b38ca6b /src | |
parent | 26482e855b376b0f8ec795dc8c293b74bc66fefd (diff) | |
download | tor-743c6c827778533fcbd7b3075311dc5c547b9846.tar.gz tor-743c6c827778533fcbd7b3075311dc5c547b9846.zip |
OpenBSD malloc.h believes that you should be able to detect headers with autoconf, or build without warnings, but not both. So never include malloc.h on OpenBSD. Backport candidate.
svn:r17891
Diffstat (limited to 'src')
-rw-r--r-- | src/common/util.c | 5 | ||||
-rw-r--r-- | src/or/directory.c | 2 |
2 files changed, 7 insertions, 0 deletions
diff --git a/src/common/util.c b/src/common/util.c index 7dc8bcfb9e..c383417fde 100644 --- a/src/common/util.c +++ b/src/common/util.c @@ -72,8 +72,13 @@ #include <malloc/malloc.h> #endif #ifdef HAVE_MALLOC_H +#ifndef OPENBSD +/* OpenBSD has a malloc.h, but for our purposes, it only exists in order to + * scold us for being so stupid as to autodetect its presence. To be fair, + * they've done this since 1996, when autoconf was only 5 years old. */ #include <malloc.h> #endif +#endif #ifdef HAVE_MALLOC_NP_H #include <malloc_np.h> #endif diff --git a/src/or/directory.c b/src/or/directory.c index 34dcdd603b..d628035bb0 100644 --- a/src/or/directory.c +++ b/src/or/directory.c @@ -5,8 +5,10 @@ #include "or.h" #if defined(EXPORTMALLINFO) && defined(HAVE_MALLOC_H) && defined(HAVE_MALLINFO) +#ifndef OPENBSD #include <malloc.h> #endif +#endif /** * \file directory.c |