diff options
Diffstat (limited to 'dbus/dbus-internals.h')
-rw-r--r-- | dbus/dbus-internals.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/dbus/dbus-internals.h b/dbus/dbus-internals.h index 6f92fa4c..82950a07 100644 --- a/dbus/dbus-internals.h +++ b/dbus/dbus-internals.h @@ -195,6 +195,9 @@ extern const char *_dbus_return_if_fail_warning_format; #define _DBUS_STRUCT_OFFSET(struct_type, member) \ ((intptr_t) ((unsigned char*) &((struct_type*) 0)->member)) +#define _DBUS_ALIGNOF(type) \ + (_DBUS_STRUCT_OFFSET (struct { char _1; type _2; }, _2)) + #ifdef DBUS_DISABLE_CHECKS /* this is an assert and not an error, but in the typical --disable-checks case (you're trying * to really minimize code size), disabling these assertions makes sense. |