0
0
mirror of https://github.com/termux/termux-packages.git synced 2025-03-04 09:28:54 +00:00
termux-packages/packages/blade/src-standart-thread.c.patch
2025-02-25 08:02:11 +02:00

17 lines
393 B
Diff

+++ ./src/standard/thread.c
@@ -390,12 +390,14 @@
ENFORCE_ARG_TYPE(get_name, 0, IS_PTR);
b_thread_handle *thread = AS_PTR(args[0])->pointer;
+#ifndef __ANDROID__
if(thread != NULL && thread->vm != NULL) {
char buffer[255];
if(pthread_getname_np(thread->thread, buffer, 255) == 0) {
RETURN_STRING(buffer);
}
}
+#endif
RETURN_VALUE(EMPTY_STRING_VAL);
}