aboutsummaryrefslogtreecommitdiff
path: root/backends/platform/sdl
diff options
context:
space:
mode:
authorThierry Crozat2017-12-14 23:37:20 +0000
committerThierry Crozat2017-12-14 23:37:20 +0000
commit2926cd4a5071c9f06a2c2258b4a479028a8b8c2e (patch)
tree6545cf56c1b9520492ab0a796c2453ed7a0d1bed /backends/platform/sdl
parent008149e3576aa8d13c6831ee0c1d25c3c23deb83 (diff)
downloadscummvm-rg350-2926cd4a5071c9f06a2c2258b4a479028a8b8c2e.tar.gz
scummvm-rg350-2926cd4a5071c9f06a2c2258b4a479028a8b8c2e.tar.bz2
scummvm-rg350-2926cd4a5071c9f06a2c2258b4a479028a8b8c2e.zip
POSIX: Fix compilation with some old macOS SDKs
Diffstat (limited to 'backends/platform/sdl')
-rw-r--r--backends/platform/sdl/posix/posix.cpp7
-rw-r--r--backends/platform/sdl/posix/posix.h4
2 files changed, 11 insertions, 0 deletions
diff --git a/backends/platform/sdl/posix/posix.cpp b/backends/platform/sdl/posix/posix.cpp
index b01de2d240..8817279c50 100644
--- a/backends/platform/sdl/posix/posix.cpp
+++ b/backends/platform/sdl/posix/posix.cpp
@@ -49,7 +49,12 @@
#include <sys/wait.h>
#include <unistd.h>
+// With very old macOS SDKs (10.4 for example) spawn.h is not there. Since it is
+// used for posix_spawnp() in openUrl(), which is reimplemented in OSystem_MacOSX
+// anyway, skip this code.
+#ifndef MACOSX
#include <spawn.h>
+#endif
extern char **environ;
OSystem_POSIX::OSystem_POSIX(Common::String baseConfigName)
@@ -268,6 +273,7 @@ bool OSystem_POSIX::displayLogFile() {
return WIFEXITED(status) && WEXITSTATUS(status) == 0;
}
+#ifndef MACOSX
bool OSystem_POSIX::openUrl(const Common::String &url) {
// inspired by Qt's "qdesktopservices_x11.cpp"
@@ -322,6 +328,7 @@ bool OSystem_POSIX::launchBrowser(const Common::String &client, const Common::St
}
return (waitpid(pid, NULL, WNOHANG) != -1);
}
+#endif
AudioCDManager *OSystem_POSIX::createAudioCDManager() {
#ifdef USE_LINUXCD
diff --git a/backends/platform/sdl/posix/posix.h b/backends/platform/sdl/posix/posix.h
index bd3a069d5b..d21b04070b 100644
--- a/backends/platform/sdl/posix/posix.h
+++ b/backends/platform/sdl/posix/posix.h
@@ -35,7 +35,9 @@ public:
virtual bool displayLogFile();
+#ifndef MACOSX
virtual bool openUrl(const Common::String &url);
+#endif
virtual void init();
virtual void initBackend();
@@ -66,7 +68,9 @@ protected:
virtual AudioCDManager *createAudioCDManager();
+#ifndef MACOSX
bool launchBrowser(const Common::String& client, const Common::String &url);
+#endif
};
#endif