From 5198d4c0fd6cae12756fb44aed16a2d4a58b1a25 Mon Sep 17 00:00:00 2001 From: Jeff Squyres Date: Fri, 10 Jan 2014 09:05:48 -0800 Subject: [PATCH] Change the logic in bind.c to only include if we don't have posix_memalign. In http://www.open-mpi.org/community/lists/devel/2014/01/13619.php, Paul Hargrove found a compiler warning on OpenBSD where exists, but is not intended to be used (and doesn't error out, so AC_CHECK_HEADERS says its ok). --- src/bind.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/bind.c b/src/bind.c index 046b7cf1..37921bce 100644 --- a/src/bind.c +++ b/src/bind.c @@ -13,8 +13,9 @@ #ifdef HAVE_SYS_MMAN_H # include #endif -#ifdef HAVE_MALLOC_H -# include +/* is only needed if we don't have posix_memalign() */ +#if defined(hwloc_getpagesize) && !defined(HAVE_POSIX_MEMALIGN) && defined(HAVE_MEMALIGN) && defined(HAVE_MALLOC_H) +#include #endif #ifdef HAVE_UNISTD_H #include -- 2.39.5