diff --git a/plugins/vst_base/RemoteVstPlugin.cpp b/plugins/vst_base/RemoteVstPlugin.cpp index ef85fbd48..cc441ce77 100644 --- a/plugins/vst_base/RemoteVstPlugin.cpp +++ b/plugins/vst_base/RemoteVstPlugin.cpp @@ -1860,10 +1860,12 @@ int main( int _argc, char * * _argv ) } #ifdef LMMS_BUILD_WIN32 +#ifndef __WINPTHREADS_VERSION // (non-portable) initialization of statically linked pthread library pthread_win32_process_attach_np(); pthread_win32_thread_attach_np(); #endif +#endif #ifdef LMMS_BUILD_LINUX #ifdef LMMS_HAVE_SCHED_H @@ -1897,8 +1899,10 @@ int main( int _argc, char * * _argv ) #ifdef LMMS_BUILD_WIN32 +#ifndef __WINPTHREADS_VERSION pthread_win32_thread_detach_np(); pthread_win32_process_detach_np(); +#endif #endif return 0; diff --git a/plugins/zynaddsubfx/LocalZynAddSubFx.cpp b/plugins/zynaddsubfx/LocalZynAddSubFx.cpp index 05b6a725e..586481b82 100644 --- a/plugins/zynaddsubfx/LocalZynAddSubFx.cpp +++ b/plugins/zynaddsubfx/LocalZynAddSubFx.cpp @@ -25,6 +25,7 @@ #include #include +#include #include "LocalZynAddSubFx.h" @@ -46,9 +47,11 @@ LocalZynAddSubFx::LocalZynAddSubFx() if( s_instanceCount == 0 ) { #ifdef LMMS_BUILD_WIN32 +#ifndef __WINPTHREADS_VERSION // (non-portable) initialization of statically linked pthread library pthread_win32_process_attach_np(); pthread_win32_thread_attach_np(); +#endif #endif initConfig(); diff --git a/plugins/zynaddsubfx/RemoteZynAddSubFx.cpp b/plugins/zynaddsubfx/RemoteZynAddSubFx.cpp index e769594fa..2e4535d73 100644 --- a/plugins/zynaddsubfx/RemoteZynAddSubFx.cpp +++ b/plugins/zynaddsubfx/RemoteZynAddSubFx.cpp @@ -263,10 +263,12 @@ int main( int _argc, char * * _argv ) } #ifdef LMMS_BUILD_WIN32 +#ifndef __WINPTHREADS_VERSION // (non-portable) initialization of statically linked pthread library pthread_win32_process_attach_np(); pthread_win32_thread_attach_np(); #endif +#endif RemoteZynAddSubFx * remoteZASF = @@ -278,8 +280,10 @@ int main( int _argc, char * * _argv ) #ifdef LMMS_BUILD_WIN32 +#ifndef __WINPTHREADS_VERSION pthread_win32_thread_detach_np(); pthread_win32_process_detach_np(); +#endif #endif return 0;