diff --git a/src/shared/util.h b/src/shared/util.h
index 04c600f..8437662 100644
--- a/src/shared/util.h
+++ b/src/shared/util.h
#endif
#define get_unaligned(ptr) \
-({ \
+__extension__ ({ \
struct __attribute__((packed)) { \
- typeof(*(ptr)) __v; \
- } *__p = (typeof(__p)) (ptr); \
+ __typeof__(*(ptr)) __v; \
+ } *__p = (__typeof__(__p)) (ptr); \
__p->__v; \
})
#define put_unaligned(val, ptr) \
do { \
struct __attribute__((packed)) { \
- typeof(*(ptr)) __v; \
- } *__p = (typeof(__p)) (ptr); \
+ __typeof__(*(ptr)) __v; \
+ } *__p = (__typeof__(__p)) (ptr); \
__p->__v = (val); \
} while (0)