Update bigstring_unix_stubs.c
The definition of msghdr in musl adds pad in the struct. The proposed initialization clean the whole structure (zeroing) without taking care of how many fields in the struct are.
Hope it works
I'm not sure this patch is necessary. Going by the C99 standard:
C99 Standard 6.7.8.21
If there are fewer initializers in a brace-enclosed list than there are elements or members of an aggregate, or fewer characters in a string literal used to initialize an array of known size than there are elements in the array, the remainder of the aggregate shall be initialized implicitly the same as objects that have static storage duration.
Therefore, if musl defines additional padding fields for msghdr, they still get zero-initialized with the current code.
The problem is the syntax not the semantic
when you have a this initializer " {NULL, 0, NULL, 0, NULL, 0, 0} "
the first NULL goes with the first item in the struct, 0 goes with the second and so on
so with glibc:
msg_name = NULL msg_namelen = 0 msg_iov = NULL msg_iovlen = 0 msg_control = NULL msg_controllen = 0 msg_flags = 0
in musl : msg_name = NULL msg_namelen = 0 msg_iov = NULL msg_iovlen = 0 _pad1 = NULL <<< and here it error out: _pad1 is defined as integer and NULL is a (void*)0