fix compilation for MSDOS (#3369)

This commit is contained in:
Mikhail Paulyshka 2023-04-01 23:40:53 +03:00 committed by GitHub
parent ab956f600f
commit d3c10f5167
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 0 deletions

View File

@ -99,6 +99,10 @@ set(FMT_SYSTEM_HEADERS_ATTRIBUTE "")
if (FMT_SYSTEM_HEADERS)
set(FMT_SYSTEM_HEADERS_ATTRIBUTE SYSTEM)
endif ()
if(CMAKE_SYSTEM_NAME STREQUAL "MSDOS")
set(FMT_TEST OFF)
message(STATUS "MSDOS is incompatible with gtest")
endif()
# Get version from core.h
file(READ include/fmt/core.h core_h)

View File

@ -372,6 +372,7 @@ file file::open_windows_file(wcstring_view path, int oflag) {
}
# endif
#if !defined(__MSDOS__)
long getpagesize() {
# ifdef _WIN32
SYSTEM_INFO si;
@ -384,6 +385,7 @@ long getpagesize() {
return size;
# endif
}
#endif
FMT_BEGIN_DETAIL_NAMESPACE