Sun, 30 Nov 2025 15:50:36 +0100
instead of including stdalign.h, check if the macro is defined (Solaris does not have the header)
| src/linked_list.c | file | annotate | diff | comparison | revisions |
--- a/src/linked_list.c Sun Nov 30 15:45:35 2025 +0100 +++ b/src/linked_list.c Sun Nov 30 15:50:36 2025 +0100 @@ -30,8 +30,14 @@ #include "cx/compare.h" #include <string.h> #include <assert.h> + #if __STDC_VERSION__ < 202311L -#include <stdalign.h> +// we cannot simply include stdalign.h +// because Solaris is not entirely C11 complaint +#ifndef __alignof_is_defined +#define alignof _Alignof +#define __alignof_is_defined 1 +#endif #endif // LOW LEVEL LINKED LIST FUNCTIONS