Parent: af39e81ae92ed117719a77017adf2bb6b2dc5046
Author: Patrick Ohly <patrick.ohly@intel.com>
Committer: Marcel Holtmann <marcel@holtmann.org>
Date: 2012-03-05 01:24:39
Tree: 4dfb6a28e13a4007c93720b4ffeec1ab8ae30c24
lib: Fix compile issue when using in C++ The compiler error is: /usr/include/bluetooth/bluetooth.h::131:9: error: invalid conversion from 'void*' to 'bt_get_le64(void*)::<anonymous struct>*' ... The reason is that C++, in contrast to C, does not allow conversion of void * to anything, and this code gets compiled as C++ when the app is written in C++. The macro with the assignment itself is older, but only recent Bluez starts to use it in inline functions, thus triggering the problem. This patch keeps the "struct __attribute__((packed))" magic and merely changes the typecast so that it works in C and C++. Like the existing macro this patch relies on support for typeof.
Diffstat
| M | lib/bluetooth.h | | | 4 | ++- - |
1 files changed, 2 insertions(+), 2 deletions(-)