-#define BT_PTR_ALIGN(p, a) ((typeof(p)) BT_ALIGN((unsigned long) (p), a))
-#define BT_ALIGN_FLOOR(x, a) __BT_ALIGN_FLOOR_MASK(x, (typeof(x)) (a) - 1)
+#define BT_PTR_ALIGN(p, a) ((__typeof__(p)) BT_ALIGN((unsigned long) (p), a))
+#define BT_ALIGN_FLOOR(x, a) __BT_ALIGN_FLOOR_MASK(x, (__typeof__(x)) (a) - 1)