summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGlenn Kasten <gkasten@google.com>2012-01-12 07:35:36 -0800
committerGlenn Kasten <gkasten@google.com>2012-01-12 07:42:58 -0800
commit6e6506eb74c918e761f9ba08a6c71897334747c1 (patch)
tree31f673ce2f4b49b340d6ef37e466a6c9a263ed68
parent9657b13bd143660e9285e9bec379eec12c866110 (diff)
downloadbluetooth-6e6506eb74c918e761f9ba08a6c71897334747c1.tar.gz
Fix build warning for strtoul
Change-Id: I47fc5e9f932869026609ac2430674aabe9afb6ec
-rw-r--r--bluedroid/bluetooth.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/bluedroid/bluetooth.c b/bluedroid/bluetooth.c
index 570cdd9..ee104c9 100644
--- a/bluedroid/bluetooth.c
+++ b/bluedroid/bluetooth.c
@@ -18,6 +18,7 @@
#include <errno.h>
#include <fcntl.h>
+#include <stdlib.h>
#include <sys/ioctl.h>
#include <sys/socket.h>
#include <sys/types.h>
@@ -280,7 +281,7 @@ int ba2str(const bdaddr_t *ba, char *str) {
int str2ba(const char *str, bdaddr_t *ba) {
int i;
for (i = 5; i >= 0; i--) {
- ba->b[i] = (uint8_t) strtoul(str, &str, 16);
+ ba->b[i] = (uint8_t) strtoul(str, (char **) &str, 16);
str++;
}
return 0;