From 1f0fe7443a1ecddd320f2c693607b2afee9bbe2f Mon Sep 17 00:00:00 2001 From: "Uwe L. Korn" Date: Tue, 26 Oct 2021 18:21:56 +0200 Subject: [PATCH] Use libssh2_EXPORTS as an alternative to _WINDLL (#470) Files: libssh2.h Notes: `_WINDLL` is only defined when a Visual Studio CMake generator is used, `libssh2_EXPORTS` is used though for all CMake generator if a shared libssh2 library is being built. Credit: Uwe L. Korn --- include/libssh2.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/libssh2.h b/include/libssh2.h index 6af8cbaf..d064b316 100644 --- a/include/libssh2.h +++ b/include/libssh2.h @@ -100,7 +100,7 @@ extern "C" { /* Allow alternate API prefix from CFLAGS or calling app */ #ifndef LIBSSH2_API # ifdef LIBSSH2_WIN32 -# ifdef _WINDLL +# if defined(_WINDLL) || defined(libssh2_EXPORTS) # ifdef LIBSSH2_LIBRARY # define LIBSSH2_API __declspec(dllexport) # else