diff --git a/source/shared_lib/CMakeLists.txt b/source/shared_lib/CMakeLists.txt index e871a075d..ce05d1228 100644 --- a/source/shared_lib/CMakeLists.txt +++ b/source/shared_lib/CMakeLists.txt @@ -305,7 +305,7 @@ IF(BUILD_MEGAGLEST_MODEL_VIEWER OR BUILD_MEGAGLEST_MAP_EDITOR OR BUILD_MEGAGLEST if (CMAKE_SYSTEM_NAME STREQUAL "Darwin") add_definitions (-DMACOSX -D_DARWIN_C_SOURCE) else() - add_definitions (-D_POSIX_C_SOURCE=1) + add_definitions (-D_POSIX_C_SOURCE=200809L) endif () endif() diff --git a/source/shared_lib/sources/platform/common/platform_common.cpp b/source/shared_lib/sources/platform/common/platform_common.cpp index e3026d5e2..c825836fe 100644 --- a/source/shared_lib/sources/platform/common/platform_common.cpp +++ b/source/shared_lib/sources/platform/common/platform_common.cpp @@ -756,9 +756,9 @@ pair hasCachedFileCRCValue(string crcCacheFile, uint32 &value) { char gitVer[500]=""; char actualFilePath[8096]=""; int readbytes = fscanf(fp,"%20ld,%20u,%20ld\n%499s\n%499s\n%8095s", - &refreshDate, + (long *)&refreshDate, &crcValue, - &lastUpdateDate, + (long *)&lastUpdateDate, &gameVer[0], &gitVer[0], &actualFilePath[0]); @@ -871,9 +871,9 @@ void writeCachedFileCRCValue(string crcCacheFile, uint32 &crcValue, string actua string writeActualFileName = Shared::PlatformByteOrder::toCommonEndian(actualFileName); fprintf(fp,"%20ld,%20u,%20ld", - Shared::PlatformByteOrder::toCommonEndian(refreshDate), + (long)Shared::PlatformByteOrder::toCommonEndian(refreshDate), Shared::PlatformByteOrder::toCommonEndian(crcValue), - Shared::PlatformByteOrder::toCommonEndian(now)); + (long)Shared::PlatformByteOrder::toCommonEndian(now)); fprintf(fp,"\n%s\n%s\n%s", writeGameVer.c_str(), diff --git a/source/tools/glexemel/CMakeLists.txt b/source/tools/glexemel/CMakeLists.txt index 9caa94088..5dcdfc9b1 100644 --- a/source/tools/glexemel/CMakeLists.txt +++ b/source/tools/glexemel/CMakeLists.txt @@ -10,9 +10,9 @@ IF(BUILD_MEGAGLEST_MODEL_IMPORT_EXPORT_TOOLS) add_executable(g2xml g2xml.c g3dv4.h) - IF(${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD") + IF(${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD" OR ${CMAKE_SYSTEM_NAME} MATCHES "OpenBSD") SET(CMAKE_INCLUDE_PATH /usr/local/include) - ENDIF(${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD") + ENDIF(${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD" OR ${CMAKE_SYSTEM_NAME} MATCHES "OpenBSD") find_package(LibXml2) IF(LIBXML2_FOUND)