mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 05:07:45 +00:00
AK: Don't try to include <unistd.h> on windows for PAGE_SIZE
This commit is contained in:
parent
b81a457de5
commit
06816deb78
1 changed files with 5 additions and 2 deletions
|
@ -168,16 +168,19 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef AK_OS_SERENITY
|
#ifndef AK_OS_SERENITY
|
||||||
|
# ifdef AK_OS_WINDOWS
|
||||||
|
// FIXME: No idea where to get this, but it's 4096 anyway :^)
|
||||||
|
# define PAGE_SIZE 4096
|
||||||
// On macOS (at least Mojave), Apple's version of this header is not wrapped
|
// On macOS (at least Mojave), Apple's version of this header is not wrapped
|
||||||
// in extern "C".
|
// in extern "C".
|
||||||
# ifdef AK_OS_MACOS
|
# elif defined(AK_OS_MACOS)
|
||||||
extern "C" {
|
extern "C" {
|
||||||
# endif
|
# endif
|
||||||
# include <unistd.h>
|
# include <unistd.h>
|
||||||
# undef PAGE_SIZE
|
# undef PAGE_SIZE
|
||||||
# define PAGE_SIZE sysconf(_SC_PAGESIZE)
|
# define PAGE_SIZE sysconf(_SC_PAGESIZE)
|
||||||
# ifdef AK_OS_MACOS
|
# ifdef AK_OS_MACOS
|
||||||
};
|
}
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue