1 /* $NetBSD: d_c99_nested_struct.c,v 1.3 2021/01/31 14:57:28 rillig Exp $ */ 2 # 3 "d_c99_nested_struct.c" 3 4 /* C99 nested struct init with named and non-named initializers */ 5 typedef struct pthread_mutex_t { 6 unsigned int ptm_magic; 7 char ptm_errorcheck; 8 9 char ptm_pad1[3]; 10 11 char ptm_interlock; 12 13 char ptm_pad2[3]; 14 15 volatile void *ptm_owner; 16 void *volatile ptm_waiters; 17 unsigned int ptm_recursed; 18 void *ptm_spare2; 19 } pthread_mutex_t; 20 21 22 struct arc4random_global { 23 pthread_mutex_t lock; 24 } arc4random_global = { 25 .lock = { 0x33330003, 0, { 0, 0, 0 }, 0, { 0, 0, 0 }, ((void *)0), 26 ((void *)0), 0, ((void *)0) }, 27 }; 28