adb: Use bionic's strtok_r() for Windows
A recent change use strtok_r which broke the Windows build.
Clear this potential landmine by adding adb_strtok_r to sysdeps.h
in the typical fashion. For Windows, the actual implementation
in sysdeps_win32.c was copied from bionic/libc/string/strtok.c.
Change-Id: Ibb71555bc429f7058c07c3d39e0b62859c79635c
Signed-off-by: Scott Anderson <saa@android.com>
diff --git a/adb/adb.c b/adb/adb.c
index ed8d230..530f13d 100644
--- a/adb/adb.c
+++ b/adb/adb.c
@@ -322,7 +322,7 @@
if (cp) {
char *save;
char *key;
- key = strtok_r(cp + 1, prop_seps, &save);
+ key = adb_strtok_r(cp + 1, prop_seps, &save);
while (key) {
cp = strchr(key, key_val_sep);
if (cp) {
@@ -334,7 +334,7 @@
else if (!strcmp(key, "ro.product.device"))
qual_overwrite(&t->device, cp);
}
- key = strtok_r(NULL, prop_seps, &save);
+ key = adb_strtok_r(NULL, prop_seps, &save);
}
}
}