diff --git a/src/api/pmi.c b/src/api/pmi.c index 3382656d457206be5e77ff894af3b1ff3e678460..ceed8a3268adcd32fe03c96f5a9fc7d492605094 100644 --- a/src/api/pmi.c +++ b/src/api/pmi.c @@ -79,7 +79,9 @@ * with SLURM; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. \*****************************************************************************/ -#define _GNU_SOURCE +#ifndef _GNU_SOURCE +# define _GNU_SOURCE +#endif #include <pthread.h> #include <signal.h> diff --git a/src/plugins/proctrack/pgid/proctrack_pgid.c b/src/plugins/proctrack/pgid/proctrack_pgid.c index 04880e102bbbba6e302984e6762197c3b50aefa4..2c77b32ee77c61eed9ebd1212da2beca7f1b848b 100644 --- a/src/plugins/proctrack/pgid/proctrack_pgid.c +++ b/src/plugins/proctrack/pgid/proctrack_pgid.c @@ -46,7 +46,9 @@ # include <inttypes.h> #endif -#define __USE_XOPEN_EXTENDED /* getpgid */ +#ifndef __USE_XOPEN_EXTENDED +# define __USE_XOPEN_EXTENDED /* getpgid */ +#endif #include <unistd.h> #include <sys/types.h> diff --git a/src/plugins/task/affinity/affinity.h b/src/plugins/task/affinity/affinity.h index b8ee34260b0c1db690c17d167695c8e267883209..4ee3d27db120dc7da45913c9b40476759d6227b1 100644 --- a/src/plugins/task/affinity/affinity.h +++ b/src/plugins/task/affinity/affinity.h @@ -61,8 +61,13 @@ #include <sys/utsname.h> #include <unistd.h> -#define _GNU_SOURCE -#define __USE_GNU +#ifndef _GNU_SOURCE +# define _GNU_SOURCE +#endif +#ifndef __USE_GNU +#define __USE_GNU +#endif + #include <sched.h> /* SMB */ #ifdef HAVE_STDLIB_H