Convert shared.c to C++

This commit is contained in:
Ted John 2018-01-18 12:51:37 +00:00
parent 3df8ae6960
commit 34d41aeadd
1 changed files with 6 additions and 1 deletions

View File

@ -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
}
}
}