mirror of
https://git.kernel.org/pub/scm/bluetooth/bluez.git
synced 2024-11-24 20:54:19 +08:00
lib: Fix compilation error in C++ due to inline function
This adds explicit typecasts to an inline function to make it C++ compatible. What follows is a sample error message from g++ when compiling without this patch. /usr/include/bluetooth/bluetooth.h: In function 'void bswap_128(const void*, void*)': /usr/include/bluetooth/bluetooth.h:348:21: error: invalid conversion from 'const void*' to 'const uint8_t* {aka const unsigned char*}' [-fpermissive] const uint8_t *s = src;
This commit is contained in:
parent
91f595dda9
commit
3d9fc0e100
@ -345,8 +345,8 @@ typedef struct {
|
||||
|
||||
static inline void bswap_128(const void *src, void *dst)
|
||||
{
|
||||
const uint8_t *s = src;
|
||||
uint8_t *d = dst;
|
||||
const uint8_t *s = (const uint8_t *) src;
|
||||
uint8_t *d = (uint8_t *) dst;
|
||||
int i;
|
||||
|
||||
for (i = 0; i < 16; i++)
|
||||
|
Loading…
Reference in New Issue
Block a user