--- a/lib/bluetooth.h +++ a/lib/bluetooth.h @@ -140,16 +140,16 @@ enum { #define bt_get_unaligned(ptr) \ ({ \ struct __attribute__((packed)) { \ - typeof(*(ptr)) __v; \ - } *__p = (typeof(__p)) (ptr); \ + __typeof__(*(ptr)) __v; \ + } *__p = (__typeof__(__p)) (ptr); \ __p->__v; \ }) #define bt_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)