on stock android, pthread_cancel and phtread_setcancelstate doesn't exist

Change-Id: Icbe281a301004ae2bcda4821a50fb4a41088e85d
diff --git a/fuse/fuse.c b/fuse/fuse.c
index 34b11d4..588d445 100644
--- a/fuse/fuse.c
+++ b/fuse/fuse.c
@@ -4579,7 +4579,11 @@
 {
 	if (lru_enabled(f)) {
 		pthread_mutex_lock(&f->lock);
+#ifndef ANDROID
 		pthread_cancel(f->prune_thread);
+#else
+		pthread_kill(f->prune_thread, SIGUSR1);
+#endif
 		pthread_mutex_unlock(&f->lock);
 		pthread_join(f->prune_thread, NULL);
 	}
diff --git a/fuse/fuse_loop_mt.c b/fuse/fuse_loop_mt.c
index 7e400c2..aefc3ec 100644
--- a/fuse/fuse_loop_mt.c
+++ b/fuse/fuse_loop_mt.c
@@ -81,9 +81,13 @@
 		};
 		int res;
 
+#ifndef ANDROID
 		pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, NULL);
+#endif
 		res = fuse_session_receive_buf(mt->se, &fbuf, &ch);
+#ifndef ANDROID
 		pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, NULL);
+#endif
 		if (res == -EINTR)
 			continue;
 		if (res <= 0) {
@@ -245,8 +249,13 @@
 		while (!fuse_session_exited(se))
 			sem_wait(&mt.finish);
 
+#ifndef ANDROID
 		for (w = mt.main.next; w != &mt.main; w = w->next)
 			pthread_cancel(w->thread_id);
+#else
+                for (w = mt.main.next; w != &mt.main; w = w->next)
+			pthread_kill(w->thread_id, SIGUSR1);
+#endif
 		mt.exit = 1;
 
 		while (mt.main.next != &mt.main)