From 34d41aeadd69f6b2f00bb1081b0e291c43120d8f Mon Sep 17 00:00:00 2001 From: Ted John Date: Thu, 18 Jan 2018 12:51:37 +0000 Subject: [PATCH] Convert shared.c to C++ --- src/openrct2/platform/{shared.c => Shared.cpp} | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) rename src/openrct2/platform/{shared.c => Shared.cpp} (98%) diff --git a/src/openrct2/platform/shared.c b/src/openrct2/platform/Shared.cpp similarity index 98% rename from src/openrct2/platform/shared.c rename to src/openrct2/platform/Shared.cpp index 8b1aa76ae0..ac167812f5 100644 --- a/src/openrct2/platform/shared.c +++ b/src/openrct2/platform/Shared.cpp @@ -45,6 +45,9 @@ #endif #endif +extern "C" +{ + #if defined(__APPLE__) && (__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 101200) static mach_timebase_info_data_t _mach_base_info = { 0 }; #endif @@ -60,7 +63,7 @@ char * strndup(const char * src, size_t size) return NULL; } - dst = memcpy(dst, src, len); + dst = (char *)memcpy(dst, src, len); dst[len] = '\0'; return (char *)dst; } @@ -234,3 +237,5 @@ void core_init() #endif } } + +}