diff options
| author | Ethan Morgan <ethan@gweithio.com> | 2026-02-14 16:44:06 +0000 |
|---|---|---|
| committer | Ethan Morgan <ethan@gweithio.com> | 2026-02-14 16:44:06 +0000 |
| commit | 54409423f767d8b1cf30cb7d0efca6b4ca138823 (patch) | |
| tree | d915ac7828703ce4b963efdd9728a1777ba18c1e /vcpkg/ports/cpprestsdk/fix-clang-dllimport.patch | |
Diffstat (limited to 'vcpkg/ports/cpprestsdk/fix-clang-dllimport.patch')
| -rw-r--r-- | vcpkg/ports/cpprestsdk/fix-clang-dllimport.patch | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/vcpkg/ports/cpprestsdk/fix-clang-dllimport.patch b/vcpkg/ports/cpprestsdk/fix-clang-dllimport.patch new file mode 100644 index 0000000..52552a5 --- /dev/null +++ b/vcpkg/ports/cpprestsdk/fix-clang-dllimport.patch @@ -0,0 +1,52 @@ +diff --git a/Release/include/cpprest/details/cpprest_compat.h b/Release/include/cpprest/details/cpprest_compat.h +index bf107479..00581371 100644 +--- a/Release/include/cpprest/details/cpprest_compat.h ++++ b/Release/include/cpprest/details/cpprest_compat.h +@@ -29,7 +29,6 @@ + #else // ^^^ _WIN32 ^^^ // vvv !_WIN32 vvv + + #define __declspec(x) __attribute__((x)) +-#define dllimport + #define novtable /* no novtable equivalent */ + #define __assume(x) \ + do \ +@@ -74,9 +73,17 @@ + #define _ASYNCRTIMP_TYPEINFO + #else // ^^^ _NO_ASYNCRTIMP ^^^ // vvv !_NO_ASYNCRTIMP vvv + #ifdef _ASYNCRT_EXPORT ++#ifdef _WIN32 + #define _ASYNCRTIMP __declspec(dllexport) ++#else ++#define _ASYNCRTIMP __attribute__((visibility("default"))) ++#endif + #else // ^^^ _ASYNCRT_EXPORT ^^^ // vvv !_ASYNCRT_EXPORT vvv ++#ifdef _WIN32 + #define _ASYNCRTIMP __declspec(dllimport) ++#else ++#define _ASYNCRTIMP ++#endif + #endif // _ASYNCRT_EXPORT + + #if defined(_WIN32) +diff --git a/Release/include/pplx/pplx.h b/Release/include/pplx/pplx.h +index d9ba9c61..8d36252c 100644 +--- a/Release/include/pplx/pplx.h ++++ b/Release/include/pplx/pplx.h +@@ -30,9 +30,17 @@ + #define _PPLXIMP + #else + #ifdef _PPLX_EXPORT ++#ifdef _WIN32 + #define _PPLXIMP __declspec(dllexport) + #else ++#define _PPLXIMP __attribute__((visibility("default"))) ++#endif ++#else ++#ifdef _WIN32 + #define _PPLXIMP __declspec(dllimport) ++#else ++#define _PPLXIMP ++#endif + #endif + #endif + |