Fix preprocessor conditional logic in previous CL
Follow the pattern established by Android to not call pthread
cancelelation machinery.
Change-Id: Id0ae4f51832663e98fceaf74f365cfc9dd318b1e
diff --git a/glslang/OSDependent/Unix/ossource.cpp b/glslang/OSDependent/Unix/ossource.cpp
index 0bd5bd9..18310e9 100644
--- a/glslang/OSDependent/Unix/ossource.cpp
+++ b/glslang/OSDependent/Unix/ossource.cpp
@@ -53,13 +53,12 @@
//
// Wrapper for Linux call to DetachThread. This is required as pthread_cleanup_push() expects
// the cleanup routine to return void.
-//
+//
static void DetachThreadLinux(void *)
{
DetachThread();
}
-
//
// Registers cleanup handler, sets cancel type and state, and executes the thread specific
// cleanup handler. This function will be called in the Standalone.cpp for regression
@@ -68,10 +67,8 @@
//
void OS_CleanupThreadData(void)
{
-#ifdef __Fuchsia__
- // Fuchsia does not have a meaningful pthread_cancel, so just do nothing.
-#else
-#ifdef __ANDROID__
+ // Fuchsia does not have a meaningful pthread_cancel.
+#if defined(__Fuchsia__) || defined(__ANDROID__)
DetachThreadLinux(NULL);
#else
int old_cancel_state, old_cancel_type;