Fix -Wundef warnings due to use of unguarded USE_POSIX_SPAWN

This commit is contained in:
Anonymous Maarten committed 2023-03-28 19:29:44 +02:00
1 parent 87aec3429b
commit 67588f72ac
1 file changed
+2 -2
+2 -2
View File
@@ -28,7 +28,7 @@
#include <unistd.h> #include <unistd.h>
#include <sys/wait.h> #include <sys/wait.h>
#include <errno.h> #include <errno.h>
#if USE_POSIX_SPAWN #ifdef USE_POSIX_SPAWN
#include <spawn.h> #include <spawn.h>
extern char **environ; extern char **environ;
#endif #endif
@@ -37,7 +37,7 @@ int SDL_SYS_OpenURL(const char *url)
{ {
const pid_t pid1 = fork(); const pid_t pid1 = fork();
if (pid1 == 0) { /* child process */ if (pid1 == 0) { /* child process */
#if USE_POSIX_SPAWN #if defined(USE_POSIX_SPAWN)
pid_t pid2; pid_t pid2;
const char *args[] = { "xdg-open", url, NULL }; const char *args[] = { "xdg-open", url, NULL };
/* Clear LD_PRELOAD so Chrome opens correctly when this application is launched by Steam */ /* Clear LD_PRELOAD so Chrome opens correctly when this application is launched by Steam */