aboutsummaryrefslogtreecommitdiffstats
path: root/compat/android28.h
diff options
context:
space:
mode:
authorLeonard Kugis <leonard@kug.is>2025-10-01 03:04:21 +0200
committerLeonard Kugis <leonard@kug.is>2025-10-01 03:04:21 +0200
commit430dc8601f110efdb306c6af425484e95dbbea3a (patch)
treef009f33a8bd5ceb84ca2fed5b68b1b7f6c2a1613 /compat/android28.h
parentddcb1a075995500bd6c91327a1dfcee346acd075 (diff)
downloadlibfuse-430dc8601f110efdb306c6af425484e95dbbea3a.tar.gz
Initial commit for android-stable
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
+