From b964fc69220455b4b3c6bcf9dbdad1ce63982628 Mon Sep 17 00:00:00 2001 From: Christian Jullien Date: Wed, 7 Jul 2021 09:08:15 +0200 Subject: [PATCH] dlopen does not exist on Windows, recent macOS adds a dlopen call which is skipped on Windows. --- libtcc.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/libtcc.c b/libtcc.c index 11999d2c..6d888c15 100644 --- a/libtcc.c +++ b/libtcc.c @@ -860,6 +860,10 @@ LIBTCCAPI void tcc_delete(TCCState *s1) #define SZPAIR(s) s "", sizeof(s)-1 ST_FUNC int tcc_add_macos_sdkpath(TCCState* s) { +#if defined(_WIN32) + (void)s; + return -1; +#else char *sdkroot = NULL, *pos = NULL; void* xcs = dlopen("libxcselect.dylib", RTLD_GLOBAL | RTLD_LAZY); CString path = {}; @@ -875,6 +879,7 @@ ST_FUNC int tcc_add_macos_sdkpath(TCCState* s) cstr_free(&path); tcc_free(sdkroot); return 0; +#endif } #undef SZPAIR