From f467d0c807c6756c73c90a179556cf7dce0ac244 Mon Sep 17 00:00:00 2001 From: Alibek Omarov Date: Thu, 9 Jun 2022 20:27:27 +0300 Subject: [PATCH] game_launch: fix Windows build (as suggested by @SNMetamorph) --- engine/common/launcher.c | 6 +++++- game_launch/game.cpp | 3 ++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/engine/common/launcher.c b/engine/common/launcher.c index e3ed73a4..2a47b597 100644 --- a/engine/common/launcher.c +++ b/engine/common/launcher.c @@ -25,7 +25,11 @@ GNU General Public License for more details. #include #endif -#include +#if XASH_WIN32 +#include // _execve +#else +#include // execve +#endif extern char **environ; static char szGameDir[128]; // safe place to keep gamedir diff --git a/game_launch/game.cpp b/game_launch/game.cpp index 1f50c956..e9ad83c9 100644 --- a/game_launch/game.cpp +++ b/game_launch/game.cpp @@ -20,14 +20,15 @@ GNU General Public License for more details. #include #include #include -#include #if XASH_POSIX #define XASHLIB "libxash." OS_LIB_EXT +#include // execve #elif XASH_WIN32 #define XASHLIB "xash.dll" #define dlerror() GetStringLastError() #include // CommandLineToArgvW +#include // _execve #else #error // port me! #endif