From f73ad6234f231136bc31aa35c4052dd61fd4b63e Mon Sep 17 00:00:00 2001 From: Chris Cannam Date: Tue, 22 Apr 2008 08:31:17 +0000 Subject: [PATCH] * Fixes for gcc-4.3 --- Makefile | 4 ++-- dssi-vst.cpp | 2 ++ dssi-vst_gui.cpp | 1 + paths.cpp | 1 + rdwrops.cpp | 2 +- remotepluginclient.cpp | 2 ++ remotepluginserver.cpp | 2 ++ remotevstclient.cpp | 5 +++-- 8 files changed, 14 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 3769cb8..2f5435c 100644 --- a/Makefile +++ b/Makefile @@ -4,10 +4,10 @@ LADSPADIR = /usr/local/lib/ladspa BINDIR = /usr/local/bin # To compile with the VeSTige compatibility header: -CXXFLAGS = -Ivestige -Wall +CXXFLAGS = -Ivestige -Wall -fPIC # To compile with the official VST SDK v2.4r2: -#CXXFLAGS = -I./vstsdk2.4/pluginterfaces/vst2.x -Wall +#CXXFLAGS = -I./vstsdk2.4/pluginterfaces/vst2.x -Wall -fPIC LDFLAGS = diff --git a/dssi-vst.cpp b/dssi-vst.cpp index 8c19f23..714eb13 100644 --- a/dssi-vst.cpp +++ b/dssi-vst.cpp @@ -18,6 +18,8 @@ #include #include #include +#include +#include // Should be divisible by three #define MIDI_BUFFER_SIZE 1023 diff --git a/dssi-vst_gui.cpp b/dssi-vst_gui.cpp index 52b2087..05c5e18 100644 --- a/dssi-vst_gui.cpp +++ b/dssi-vst_gui.cpp @@ -19,6 +19,7 @@ #include #include #include +#include #include #include diff --git a/paths.cpp b/paths.cpp index 197b9c7..1262f68 100644 --- a/paths.cpp +++ b/paths.cpp @@ -8,6 +8,7 @@ #include "paths.h" #include +#include std::vector Paths::getPath(std::string envVar, std::string deflt, std::string defltHomeRelPath) diff --git a/rdwrops.cpp b/rdwrops.cpp index f32c20f..e3b21a1 100644 --- a/rdwrops.cpp +++ b/rdwrops.cpp @@ -64,7 +64,7 @@ rdwr_tryWrite(int fd, const void *buf, size_t count, const char *file, int line) if (w < (ssize_t)count) { fprintf(stderr, "Failed to complete write on fd %d (have %d, put %d) at %s:%d\n", - fd, count, w, file, line); + fd, (int)count, (int)w, file, line); throw RemotePluginClosedException(); } diff --git a/remotepluginclient.cpp b/remotepluginclient.cpp index 35ae093..a402047 100644 --- a/remotepluginclient.cpp +++ b/remotepluginclient.cpp @@ -16,6 +16,8 @@ #include #include #include +#include +#include #include "rdwrops.h" diff --git a/remotepluginserver.cpp b/remotepluginserver.cpp index 14a3091..4a7575e 100644 --- a/remotepluginserver.cpp +++ b/remotepluginserver.cpp @@ -17,6 +17,8 @@ #include #include +#include +#include #include "rdwrops.h" diff --git a/remotevstclient.cpp b/remotevstclient.cpp index 0ea0a8a..1aaf5ff 100644 --- a/remotevstclient.cpp +++ b/remotevstclient.cpp @@ -17,6 +17,7 @@ #include #include #include +#include #include "rdwrops.h" #include "paths.h" @@ -75,7 +76,7 @@ RemoteVSTClient::RemoteVSTClient(std::string dllName, bool showGUI) : cleanup(); throw((std::string)"Fork failed"); } else if (child == 0) { // child process - if (execlp(fileName.c_str(), fileName.c_str(), argStr, 0)) { + if (execlp(fileName.c_str(), fileName.c_str(), argStr, NULL)) { perror("Exec failed"); exit(1); } @@ -336,7 +337,7 @@ RemoteVSTClient::queryPlugins(std::vector &plugins) unlink(fifoFile); throw((std::string)"Fork failed"); } else if (child == 0) { // child process - if (execlp(fileName.c_str(), fileName.c_str(), fifoFile, 0)) { + if (execlp(fileName.c_str(), fileName.c_str(), fifoFile, NULL)) { perror("Exec failed"); unlink(fifoFile); exit(1);