1
0
mirror of https://github.com/mpv-player/mpv synced 2025-02-03 21:52:12 +00:00

osdep: add portable C11-like alignof() macro

This commit is contained in:
wm4 2018-05-20 20:47:43 +02:00
parent af4fe28af7
commit 707b404820

View File

@ -17,5 +17,10 @@
#define PRINTF_ATTRIBUTE(a1, a2) __attribute__ ((format (gnu_printf, a1, a2)))
#endif
#if __STDC_VERSION__ >= 201112L
#include <stdalign.h>
#else
#define alignof(x) (offsetof(struct {char unalign_; x u;}, u))
#endif
#endif