diff --git a/src/bluetooth.h b/src/bluetooth.h index 15841097..af6f02c1 100644 --- a/src/bluetooth.h +++ b/src/bluetooth.h @@ -69,3 +69,11 @@ static inline int bt_bacmp(const bdaddr_t *ba1, const bdaddr_t *ba2) { return memcmp(ba1, ba2, sizeof(bdaddr_t)); } + +static inline void bt_str2ba(const char *str, bdaddr_t *ba) +{ + int i; + + for (i = 5; i >= 0; i--, str += 3) + ba->b[i] = strtol(str, NULL, 16); +} diff --git a/src/handsfree-audio.c b/src/handsfree-audio.c index 13f7c221..d96c7c4a 100644 --- a/src/handsfree-audio.c +++ b/src/handsfree-audio.c @@ -26,6 +26,7 @@ #include #include #include +#include #include #include #include