Open GoogleCodeExporter opened 8 years ago
I had similar issues when compiling under ArchLinux on a raspberry pi.
The errors were due to typos in the bluetooth.h file (bluez 4.101-1
(archlinuxarm does not have libbluetooth-dev)
Look for the line /* Bluetooth unaligned access */ in bluetooth.h
The next two defines are bt_get_unaligned(ptr) and bt_put_unaligned(val,ptr)
I replaced them with the following and the compile errors went away.
#ifndef __cplusplus
/*
* traditional code, doesn't work in c++ because
* of the void * to struct pointer assignment
*/
#define bt_get_unaligned(ptr) \
({ \
struct __attribute__((packed)) { \
__typeof__(*(ptr)) __v; \
} *__p = (void *) (ptr); \
__p->__v; \
})
#define bt_put_unaligned(val, ptr) \
do { \
struct __attribute__((packed)) { \
__typeof__(*(ptr)) __v; \
} *__p = (void *) (ptr); \
__p->__v = (val); \
} while(0)
#else /* __cplusplus */
#define bt_get_unaligned(ptr) \
({ \
struct __attribute__((packed)) { \
__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); \
__p->__v = (val); \
} while(0)
#endif /* __cplusplus */
Original comment by peter.f....@gmail.com
on 2 Dec 2012 at 10:54
Hi
I have the same issue. I'm afraid I'm a very recent convert to linux and ubuntu
and whilst I have found the bluetooth.h file, I am unable to save the changes
due to permission errors. What am I doing wrong? I am signed-in with admin
rights (using 12.04).
Cheers
Bob
Original comment by bobbilli...@gmail.com
on 13 Feb 2013 at 9:02
Original issue reported on code.google.com by
cjrow...@gmail.com
on 29 Sep 2012 at 6:04