mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-22 09:19:03 +00:00
LibCore: Add S_ISDIR, S_ISREG to System.h on Windows
Before this commit, LibCore/System.h exposed only part of System::stat API on Windows. Namely, users of Core::System::stat had to #include <dirent.h> in order to check the return value of stat. It is OK for low-level libs like LibCore/LibFileSystem, but S_ISDIR is also used in LibWeb\Loader\GeneratedPagesLoader.cpp. We want to avoid platform #ifdefs in LibWeb.
This commit is contained in:
@@ -16,7 +16,7 @@
|
||||
#elif defined(AK_OS_LINUX)
|
||||
# include <linux/fs.h>
|
||||
#elif defined(AK_OS_WINDOWS)
|
||||
# include <dirent.h>
|
||||
# include <windows.h>
|
||||
#endif
|
||||
|
||||
// On Linux distros that use glibc `basename` is defined as a macro that expands to `__xpg_basename`, so we undefine it
|
||||
|
||||
Reference in New Issue
Block a user