Skip to content

Commit 1710f3c

Browse files
committed
Avoid depending on max_align_t in <__struct_sockaddr.h>.
`max_align_t` is not declared in C99 mode, so use an aligned attribute and `__BIGGEST_ALIGNMENT__` instead. Fixes WebAssembly/wasi-sdk#111.
1 parent 099caae commit 1710f3c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

libc-bottom-half/headers/public/__struct_sockaddr.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
#include <__typedef_sa_family_t.h>
88

99
struct sockaddr {
10-
_Alignas(max_align_t) sa_family_t sa_family;
10+
__attribute__((aligned(__BIGGEST_ALIGNMENT__))) sa_family_t sa_family;
1111
char sa_data[0];
1212
};
1313

0 commit comments

Comments
 (0)