From c93288a96ee6675af31af1932d090e29242791e3 Mon Sep 17 00:00:00 2001 From: Brian Barrett Date: Sun, 20 Aug 2006 01:45:23 +0000 Subject: [PATCH] * __USE_GNU must be set in order to get the paffinity declarations. So define the constant if it isn't already defined. Something else includes stdio.h, which has a bunch of declarations that really confuse non-GNU compilers, so be sure to include that one before setting __USE_GNU. refs trac:280 This commit was SVN r11265. The following Trac tickets were found above: Ticket 280 --> https://svn.open-mpi.org/trac/ompi/ticket/280 --- opal/mca/paffinity/linux/paffinity_linux_module.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/opal/mca/paffinity/linux/paffinity_linux_module.c b/opal/mca/paffinity/linux/paffinity_linux_module.c index 830d4c37ae..8104914bf6 100644 --- a/opal/mca/paffinity/linux/paffinity_linux_module.c +++ b/opal/mca/paffinity/linux/paffinity_linux_module.c @@ -20,6 +20,15 @@ /* This component will only be compiled on Linux, where we are guaranteed to have and friends */ +#include + +/* the affinity macros are only exposed if __USE_GNU is set (at least, + on Suse Linux for PPC). However, __USE_GNU causes problems for + some compilers (IBM XL) with stdio.h. So include stdio.h, then + set __USE_GNU. */ +#ifndef __USE_GNU +#define __USE_GNU 1 +#endif #include #include #include