mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-11-10 20:45:05 +00:00
Don't use getpagesize() on Windows
Fixes https://github.com/libsdl-org/SDL/issues/14328
This commit is contained in:
@@ -29,7 +29,11 @@
|
||||
|
||||
// CPU feature detection for SDL
|
||||
|
||||
#if defined(HAVE_SYSCONF) || defined(HAVE_GETPAGESIZE)
|
||||
#if defined(HAVE_GETPAGESIZE) && !defined(SDL_PLATFORM_WINDOWS)
|
||||
#define USE_GETPAGESIZE
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_SYSCONF) || defined(USE_GETPAGESIZE)
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
#ifdef HAVE_SYSCTLBYNAME
|
||||
@@ -1252,7 +1256,7 @@ int SDL_GetSystemPageSize(void)
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#ifdef HAVE_GETPAGESIZE
|
||||
#ifdef USE_GETPAGESIZE
|
||||
if (SDL_SystemPageSize <= 0) {
|
||||
SDL_SystemPageSize = getpagesize();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user