summaryrefslogtreecommitdiff
path: root/bluez/bluetooth.h
blob: b5e64824f848e3fb294e17c50cafce2faf15f322 (plain)
    1 From cf52a40302d0d20ccca22a7a1f53e46ef8abfca8 Mon Sep 17 00:00:00 2001
    2 From: Gabriel Souza Franco <gabrielfrancosouza@gmail.com>
    3 Date: Tue, 28 Oct 2014 15:03:07 -0200
    4 Subject: lib: Change bluetooth.h to compile in strict C
    5 
    6 ---
    7  lib/bluetooth.h | 10 +++++-----
    8  1 file changed, 5 insertions(+), 5 deletions(-)
    9 
   10 (limited to 'lib/bluetooth.h')
   11 
   12 diff --git a/lib/bluetooth.h b/lib/bluetooth.h
   13 index 61c1f9a..f214d81 100644
   14 --- a/lib/bluetooth.h
   15 +++ b/lib/bluetooth.h
   16 @@ -156,18 +156,18 @@ enum {
   17  
   18  /* Bluetooth unaligned access */
   19  #define bt_get_unaligned(ptr)			\
   20 -({						\
   21 +__extension__ ({				\
   22  	struct __attribute__((packed)) {	\
   23 -		typeof(*(ptr)) __v;		\
   24 -	} *__p = (typeof(__p)) (ptr);		\
   25 +		__typeof__(*(ptr)) __v;		\
   26 +	} *__p = (__typeof__(__p)) (ptr);	\
   27  	__p->__v;				\
   28  })
   29  
   30  #define bt_put_unaligned(val, ptr)		\
   31  do {						\
   32  	struct __attribute__((packed)) {	\
   33 -		typeof(*(ptr)) __v;		\
   34 -	} *__p = (typeof(__p)) (ptr);		\
   35 +		__typeof__(*(ptr)) __v;		\
   36 +	} *__p = (__typeof__(__p)) (ptr);	\
   37  	__p->__v = (val);			\
   38  } while(0)
   39  
   40 -- 
   41 cgit v1.1

Generated by cgit