btrfs-progs: convert: Fix a bug leads to discontinuous extents
[btrfs-progs-unstable/devel.git] / androidcompat.h
blobeec76dadb4ea5a6fee851e73875126a31873e316
1 /*
2 * Compatibility layer for Android.
4 * Stub calls or alternate functions for pthreads.
5 */
7 #ifndef __ANDROID_H__
8 #define __ANDROID_H__
10 #ifdef ANDROID
12 #define pthread_setcanceltype(type, oldtype) (0)
13 #define pthread_setcancelstate(state, oldstate) (0)
15 #define pthread_cancel(ret) pthread_kill((ret), SIGUSR1)
17 typedef struct blkid_struct_probe *blkid_probe;
19 #include <dirent.h>
20 #define direct dirent
22 #else /* !ANDROID */
24 #include <sys/dir.h>
26 #endif /* !ANDROID */
28 #endif /* __ANDROID_H__ */