From 894d2cd1309f525bd31243571d3bdaacb2dbfa9b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Linus=20Unneb=C3=A4ck?= Date: Mon, 30 Nov 2015 08:54:22 +0100 Subject: [PATCH 1/2] osx: define MAP_ANONYMOUS --- src/platform/platform.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/platform/platform.h b/src/platform/platform.h index b4b6ff7bc1..aace0e42dc 100644 --- a/src/platform/platform.h +++ b/src/platform/platform.h @@ -152,6 +152,11 @@ uint8 platform_get_locale_temperature_format(); bool platform_check_steam_overlay_attached(); +// BSD and OS X has MAP_ANON instead of MAP_ANONYMOUS +#ifndef MAP_ANONYMOUS + #define MAP_ANONYMOUS MAP_ANON +#endif + // Windows specific definitions #ifdef _WIN32 #ifndef WIN32_LEAN_AND_MEAN From c4356c1ecca1784d660d580ece585f1136fdbe8c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Linus=20Unneb=C3=A4ck?= Date: Mon, 30 Nov 2015 09:19:01 +0100 Subject: [PATCH 2/2] cmake: add iconv libraries --- CMakeLists.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 3eba8200d9..14ebfa3de6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -96,6 +96,11 @@ else (WIN32) add_executable(${PROJECT} ${ORCT2_SOURCES}) endif (WIN32) +if (APPLE) + FIND_LIBRARY(ICONV_LIBRARIES NAMES iconv libiconv libiconv-2 c) + TARGET_LINK_LIBRARIES(${PROJECT} ${ICONV_LIBRARIES}) +endif (APPLE) + # install into ${CMAKE_INSTALL_PREFIX}/bin/ #install (TARGETS ${PROJECT} DESTINATION bin)