Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- xszyjan@uw000558:~/bluez_upstream$ git show
- commit ffc335a4c2edd7a95509005c78e345f8b310d102
- Author: Szymon Janc <szymon.janc@tieto.com>
- Date: Fri Jan 13 08:44:08 2012 +0100
- Fix compilation of C++ programs that include <bluetooth/bluetooth.h>
- diff --git a/lib/bluetooth.h b/lib/bluetooth.h
- index 5bd4f03..b4891ef 100644
- --- a/lib/bluetooth.h
- +++ b/lib/bluetooth.h
- @@ -111,17 +111,19 @@ enum {
- /* Bluetooth unaligned access */
- #define bt_get_unaligned(ptr) \
- ({ \
- - struct __attribute__((packed)) { \
- + struct __s { \
- typeof(*(ptr)) __v; \
- - } *__p = (void *) (ptr); \
- + } __attribute__((packed)) ; \
- + struct __s *__p = (struct __s *) (ptr); \
- __p->__v; \
- })
- #define bt_put_unaligned(val, ptr) \
- do { \
- - struct __attribute__((packed)) { \
- + struct __s { \
- typeof(*(ptr)) __v; \
- - } *__p = (void *) (ptr); \
- + }__attribute__((packed)) ; \
- + struct __s *__p = (struct __s *) (ptr); \
- __p->__v = (val); \
- } while(0)
Add Comment
Please, Sign In to add comment