diff options
author | Ethan Yonker <dees_troy@teamw.in> | 2016-08-26 17:05:03 +0200 |
---|---|---|
committer | Ethan Yonker <dees_troy@teamw.in> | 2016-08-26 17:05:03 +0200 |
commit | 534d4e0612d96210fe76c03c8c0a0355e0f20453 (patch) | |
tree | 05324fc8c6c0d97d76fbc607d72ced81f5a0bb9d /minadbd/services.cpp | |
parent | Fix compatibility with 5.1 (diff) | |
download | android_bootable_recovery-534d4e0612d96210fe76c03c8c0a0355e0f20453.tar android_bootable_recovery-534d4e0612d96210fe76c03c8c0a0355e0f20453.tar.gz android_bootable_recovery-534d4e0612d96210fe76c03c8c0a0355e0f20453.tar.bz2 android_bootable_recovery-534d4e0612d96210fe76c03c8c0a0355e0f20453.tar.lz android_bootable_recovery-534d4e0612d96210fe76c03c8c0a0355e0f20453.tar.xz android_bootable_recovery-534d4e0612d96210fe76c03c8c0a0355e0f20453.tar.zst android_bootable_recovery-534d4e0612d96210fe76c03c8c0a0355e0f20453.zip |
Diffstat (limited to 'minadbd/services.cpp')
-rw-r--r-- | minadbd/services.cpp | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/minadbd/services.cpp b/minadbd/services.cpp index 658a43f36..753a14e38 100644 --- a/minadbd/services.cpp +++ b/minadbd/services.cpp @@ -73,7 +73,12 @@ static int create_service_thread(void (*func)(int, void *), void *cookie) { sti->cookie = cookie; sti->fd = s[1]; +#if PLATFORM_SDK_VERSION == 23 + adb_thread_t t; + if (adb_thread_create( &t, (adb_thread_func_t)service_bootstrap_func, sti)){ +#else if (!adb_thread_create(service_bootstrap_func, sti)) { +#endif free(sti); adb_close(s[0]); adb_close(s[1]); @@ -81,7 +86,7 @@ static int create_service_thread(void (*func)(int, void *), void *cookie) { return -1; } - VLOG(SERVICES) << "service thread started, " << s[0] << ":" << s[1]; + //VLOG(SERVICES) << "service thread started, " << s[0] << ":" << s[1]; return s[0]; } @@ -102,3 +107,10 @@ int service_to_fd(const char* name, const atransport* transport) { } return ret; } + +#if PLATFORM_SDK_VERSION == 23 +int service_to_fd(const char* name) { + atransport transport; + return service_to_fd(name, &transport); +} +#endif |