Skip to content

Commit 63dd834

Browse files
committed
Fixing annoying build warning.
On Mac build I observed streams of: ``` In file included from ../../opal/include/opal/sys/atomic.h:420: ../../opal/include/opal/sys/atomic_stdc.h:53:42: warning: 'PLATFORM_COMPILER_GNU' is not defined, evaluates to 0 [-Wundef] ^ 1 warning generated. ``` Signed-off-by: Geoffrey Paulsen <[email protected]> (cherry picked from commit 9777376)
1 parent d1965d2 commit 63dd834

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

opal/include/opal/sys/atomic_stdc.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
# define OPAL_ATOMIC_STDC_H
3030

3131
# include "opal_stdint.h"
32+
# include "opal/opal_portable_platform.h"
3233
# include <stdatomic.h>
3334
# include <stdint.h>
3435

@@ -50,7 +51,7 @@ static inline void opal_atomic_wmb(void)
5051

5152
static inline void opal_atomic_rmb(void)
5253
{
53-
# if defined(PLATFORM_ARCH_X86_64) && PLATFORM_COMPILER_GNU && __GNUC__ < 8
54+
# if defined(PLATFORM_ARCH_X86_64) && defined(PLATFORM_COMPILER_GNU) && __GNUC__ < 8
5455
/* work around a bug in older gcc versions (observed in gcc 6.x)
5556
* where acquire seems to get treated as a no-op instead of being
5657
* equivalent to __asm__ __volatile__("": : :"memory") on x86_64.

0 commit comments

Comments
 (0)