From: Nick Mathewson Date: Sun, 4 Jan 2009 22:47:42 +0000 (+0000) Subject: OpenBSD malloc.h believes that you should be able to detect headers with autoconf... X-Git-Tag: tor-0.2.1.10-alpha~21 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=743c6c827778533fcbd7b3075311dc5c547b9846;p=thirdparty%2Ftor.git 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 --- 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 #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 #endif +#endif #ifdef HAVE_MALLOC_NP_H #include #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 #endif +#endif /** * \file directory.c