[Scummvm-git-logs] scummvm branch-2-0 -> ee2cdefc95795b34a0a27260ee8ebdbaff631997

criezy criezy at scummvm.org
Fri Dec 15 00:51:23 CET 2017


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
ee2cdefc95 POSIX: Fix compilation with some old macOS SDKs


Commit: ee2cdefc95795b34a0a27260ee8ebdbaff631997
    https://github.com/scummvm/scummvm/commit/ee2cdefc95795b34a0a27260ee8ebdbaff631997
Author: Thierry Crozat (criezy at scummvm.org)
Date: 2017-12-14T23:45:40Z

Commit Message:
POSIX: Fix compilation with some old macOS SDKs

Changed paths:
    backends/platform/sdl/posix/posix.cpp
    backends/platform/sdl/posix/posix.h


diff --git a/backends/platform/sdl/posix/posix.cpp b/backends/platform/sdl/posix/posix.cpp
index b01de2d..8817279 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 bd3a069..d21b040 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





More information about the Scummvm-git-logs mailing list