Improve VxWorks GTHREAD_ONCE_INIT
diff mbox series

Message ID 520797AC-39E0-4A11-95B2-CD4FC33DD5B9@adacore.com
State New
Headers show
Series
  • Improve VxWorks GTHREAD_ONCE_INIT
Related show

Commit Message

Olivier Hainque Dec. 13, 2019, 1:56 p.m. UTC
This change improves the GTHREAD_ONCE_INIT initializer
exposed by gthr-vxworks.h to use a more standard syntax
for a zero-initialization, which fixes build failures
observed when activating libstdc++ builds for aarch64-vxworks.

Tested in accordance with the description in
https://gcc.gnu.org/ml/gcc-patches/2019-12/msg00911.html

Committing to mainline.

Olivier

2019-12-13  Olivier Hainque  <hainque@adacore.com>

	* config/gthr-vxworks.h (GTHREAD_ONCE_INIT): Use
	standard zero-initializer syntax.
libgcc/config/gthr-vxworks.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch
diff mbox series

diff --git a/libgcc/config/gthr-vxworks.h b/libgcc/config/gthr-vxworks.h
index 3a30ce31088..2d2860a36dd 100644
--- a/libgcc/config/gthr-vxworks.h
+++ b/libgcc/config/gthr-vxworks.h
@@ -222,7 +222,7 @@  typedef struct
 #endif
 } __gthread_once_t;
 
-#define __GTHREAD_ONCE_INIT { 0 }
+#define __GTHREAD_ONCE_INIT {}
 
 extern int __gthread_once (__gthread_once_t *__once, void (*__func)(void));