Skip to content

Commit b3e2708

Browse files
committed
Use align keywords instead of the header
OpenBSD is advertising to the preprocessor that it supports C11 but does not include the stdalign.h header. We do not actually need the header, since we can just use the keywords.
1 parent db72066 commit b3e2708

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

include/prism/defines.h

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -263,13 +263,11 @@
263263
* specify alignment in a compiler-agnostic way.
264264
*/
265265
#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L /* C11 or later */
266-
#include <stdalign.h>
267-
268266
/** Specify alignment for a type or variable. */
269-
#define PRISM_ALIGNAS(size) alignas(size)
267+
#define PRISM_ALIGNAS _Alignas
270268

271269
/** Get the alignment requirement of a type. */
272-
#define PRISM_ALIGNOF(type) alignof(type)
270+
#define PRISM_ALIGNOF _Alignof
273271
#elif defined(__GNUC__) || defined(__clang__)
274272
/** Specify alignment for a type or variable. */
275273
#define PRISM_ALIGNAS(size) __attribute__((aligned(size)))

0 commit comments

Comments
 (0)