ping On Tue, Oct 28, 2014 at 3:03 PM, Gabriel Souza Franco <gabrielfrancosouza@xxxxxxxxx> wrote: > > --- > > This change enables programs written with strict C syntax > (e.g. "-std=c11 -pedantic") to compile when including > bluetooth.h. > > v2: Resend with fixed commits. > > lib/bluetooth.h | 10 +++++----- > 1 file changed, 5 insertions(+), 5 deletions(-) > > diff --git a/lib/bluetooth.h b/lib/bluetooth.h > index 61c1f9a..f214d81 100644 > --- a/lib/bluetooth.h > +++ b/lib/bluetooth.h > @@ -156,18 +156,18 @@ enum { > > /* Bluetooth unaligned access */ > #define bt_get_unaligned(ptr) \ > -({ \ > +__extension__ ({ \ > 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) > > -- > 2.1.2 > -- To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html