1 /* $NetBSD: d_c99_nested_struct.c,v 1.4 2021/02/20 22:31:20 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 = { 26 0x33330003, 27 0, 28 { 0, 0, 0 }, 29 0, 30 { 0, 0, 0 }, 31 ((void *)0), 32 ((void *)0), 33 0, 34 ((void *)0) 35 }, 36 }; 37