diff --git a/src/doomtype.h b/src/doomtype.h index 415669ac479e928250d429bad545d34eff2770d5..9edbd32316886fec48ed64be542550144d5872fe 100644 --- a/src/doomtype.h +++ b/src/doomtype.h @@ -110,7 +110,7 @@ int startswith (const char *base, const char *tag); int endswith (const char *base, const char *tag); char *xstrtok(char *line, const char *delims); -#if defined (_WIN32) || defined (__HAIKU__) +#if defined (_WIN32) || defined (__HAIKU__) || defined (__EMSCRIPTEN__) #define HAVE_DOSSTR_FUNCS #endif diff --git a/src/sdl/i_system.c b/src/sdl/i_system.c index b2396e269b8d7cc456ee9f525aeda7991835cd4e..f5e6614d7c8cf19ca2ae59091a70d5067f542716 100644 --- a/src/sdl/i_system.c +++ b/src/sdl/i_system.c @@ -79,7 +79,7 @@ typedef LPVOID (WINAPI *p_MapViewOfFile) (HANDLE, DWORD, DWORD, DWORD, SIZE_T); #define HAVE_SDLCPUINFO #if defined (__unix__) || defined(__APPLE__) || defined (UNIXCOMMON) -#if defined (__linux__) || defined (__HAIKU__) +#if defined (__linux__) || defined (__HAIKU__) || defined (__EMSCRIPTEN__) #include <sys/statvfs.h> #else #include <sys/statvfs.h> @@ -111,9 +111,11 @@ typedef LPVOID (WINAPI *p_MapViewOfFile) (HANDLE, DWORD, DWORD, DWORD, SIZE_T); #include <errno.h> #include <sys/wait.h> #ifndef __HAIKU__ // haiku's crash dialog is just objectively better +#ifndef __EMSCRIPTEN__ // WASM does not have a rell fork() #define NEWSIGNALHANDLER #endif #endif +#endif #ifndef NOMUMBLE #ifdef __linux__ // need -lrt @@ -145,12 +147,14 @@ typedef LPVOID (WINAPI *p_MapViewOfFile) (HANDLE, DWORD, DWORD, DWORD, SIZE_T); #endif #if defined (__unix__) || defined(__APPLE__) || defined (UNIXCOMMON) +#if !defined (__EMSCRIPTEN__) #ifndef NOEXECINFO #include <execinfo.h> #endif #include <time.h> #define UNIXBACKTRACE #endif +#endif // Locations to directly check for srb2.pk3 in const char *wadDefaultPaths[] = {