From ebe63d1425641613eda3280564614bf1cf4f980a Mon Sep 17 00:00:00 2001 From: Javier Serrano Polo Date: Mon, 2 Jan 2017 21:52:58 +0100 Subject: [PATCH] Fixes for Windows builds --- plugins/vst_base/RemoteVstPlugin.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/plugins/vst_base/RemoteVstPlugin.cpp b/plugins/vst_base/RemoteVstPlugin.cpp index 0c04a0116..f512464bb 100644 --- a/plugins/vst_base/RemoteVstPlugin.cpp +++ b/plugins/vst_base/RemoteVstPlugin.cpp @@ -67,6 +67,7 @@ #endif +#include #include #include @@ -711,6 +712,7 @@ void RemoteVstPlugin::init( const std::string & _plugin_file ) +#ifdef USE_LINUX_EMBEDDER static void assert_dup2( int oldfd, int newfd ) { if( dup2( oldfd, newfd ) == -1 ) @@ -719,6 +721,7 @@ static void assert_dup2( int oldfd, int newfd ) exit( EXIT_FAILURE ); } } +#endif @@ -838,7 +841,7 @@ void RemoteVstPlugin::initEditor() close_check( outfd[1] ); char * widStr = new char[2 * sizeof m_windowID + 1]; - sprintf( widStr, "%x", m_windowID ); + sprintf( widStr, "%" PRIxPTR, m_windowID ); char * widthStr = new char[2 * sizeof m_windowWidth + 1]; sprintf( widthStr, "%x", m_windowWidth ); @@ -867,8 +870,8 @@ void RemoteVstPlugin::initEditor() char * commandLine = new char[sizeof EMBEDDER_NAME " " + strlen( name ) + 1 + 2 * sizeof m_windowID + 1 + 2 * sizeof m_windowWidth + 1 + 2 * sizeof m_windowHeight]; - sprintf( commandLine, EMBEDDER_NAME " %s %x %x %x", name, m_windowID, - m_windowWidth, m_windowHeight ); + sprintf( commandLine, EMBEDDER_NAME " %s %" PRIxPTR " %x %x", name, + m_windowID, m_windowWidth, m_windowHeight ); // Set up the pipes /*