aboutsummaryrefslogtreecommitdiffstats
path: root/compat/android28.h
diff options
context:
space:
mode:
Diffstat (limited to 'compat/android28.h')
-rw-r--r--compat/android28.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/compat/android28.h b/compat/android28.h
new file mode 100644
index 0000000..9ace496
--- /dev/null
+++ b/compat/android28.h
@@ -0,0 +1,22 @@
+#pragma once
+#include <pthread.h>
+
+#if defined(__BIONIC__)
+#ifndef PTHREAD_CANCEL_ENABLE
+#define PTHREAD_CANCEL_ENABLE 0
+#endif
+#ifndef PTHREAD_CANCEL_DISABLE
+#define PTHREAD_CANCEL_DISABLE 0
+#endif
+
+static inline int pthread_setcancelstate(int state, int *oldstate) {
+ if (oldstate) *oldstate = state;
+ return 0;
+}
+
+static inline int pthread_cancel(pthread_t t) {
+ (void)t;
+ return 0;
+}
+#endif
+