mirror of
https://github.com/thorvg/thorvg.git
synced 2025-06-13 19:44:28 +00:00
wasm: fix compilation
After 'all: fixing clang warnings' (e7c3a91
) there was a problem with wasm
compilation, as strncpy and strdup.
Disable define is __EMSCRIPTEN__.
This commit is contained in:
parent
cba7cf0e2b
commit
e12729e0d3
2 changed files with 2 additions and 2 deletions
|
@ -48,7 +48,7 @@ using namespace tvg;
|
|||
#define TVG_FALLTHROUGH
|
||||
#endif
|
||||
|
||||
#ifdef __clang__
|
||||
#if defined(__clang__) && !defined(__EMSCRIPTEN__)
|
||||
#define strncpy strncpy_s
|
||||
#define strdup _strdup
|
||||
#endif
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
|
||||
static FILE* _fopen(const char* filename, const char* mode)
|
||||
{
|
||||
#ifdef __clang__
|
||||
#if defined(__clang__) && !defined(__EMSCRIPTEN__)
|
||||
FILE *fp;
|
||||
auto err = fopen_s(&fp, filename, mode);
|
||||
if (err != 0) return nullptr;
|
||||
|
|
Loading…
Add table
Reference in a new issue