mirror of
https://github.com/thorvg/thorvg.git
synced 2025-07-28 09:05:52 +00:00
all: fix compilation errors on non-windows clang
Thorvg couldn't be compiled on macos as non-portable microsoft calls used. Changed definitions checking to Visual Studio only.
This commit is contained in:
parent
92f57a149f
commit
282b9288ab
2 changed files with 2 additions and 2 deletions
|
@ -48,7 +48,7 @@ using namespace tvg;
|
|||
#define TVG_FALLTHROUGH
|
||||
#endif
|
||||
|
||||
#if defined(__clang__) && !defined(__EMSCRIPTEN__)
|
||||
#if defined(_MSC_VER) && defined(__clang__)
|
||||
#define strncpy strncpy_s
|
||||
#define strdup _strdup
|
||||
#endif
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
|
||||
static FILE* _fopen(const char* filename, const char* mode)
|
||||
{
|
||||
#if defined(__clang__) && !defined(__EMSCRIPTEN__)
|
||||
#if defined(_MSC_VER) && defined(__clang__)
|
||||
FILE *fp;
|
||||
auto err = fopen_s(&fp, filename, mode);
|
||||
if (err != 0) return nullptr;
|
||||
|
|
Loading…
Add table
Reference in a new issue