projects
/
platform
/
upstream
/
dotnet
/
runtime.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6c57759
)
Fix nethost.h header file when consuming as a static lib. (#35373)
author
Aaron Robinson
<arobins@microsoft.com>
Fri, 24 Apr 2020 02:53:07 +0000
(19:53 -0700)
committer
GitHub
<noreply@github.com>
Fri, 24 Apr 2020 02:53:07 +0000
(19:53 -0700)
src/installer/corehost/cli/nethost/nethost.h
patch
|
blob
|
history
diff --git
a/src/installer/corehost/cli/nethost/nethost.h
b/src/installer/corehost/cli/nethost/nethost.h
index
839a3fd
..
42498ea
100644
(file)
--- a/
src/installer/corehost/cli/nethost/nethost.h
+++ b/
src/installer/corehost/cli/nethost/nethost.h
@@
-7,11
+7,17
@@
#include <stddef.h>
-#if
defined(_WIN32)
+#if
def _WIN32
#ifdef NETHOST_EXPORT
#define NETHOST_API __declspec(dllexport)
#else
- #define NETHOST_API __declspec(dllimport)
+ // Consuming the nethost as a static library
+ // Shouldn't export attempt to dllimport.
+ #ifdef NETHOST_USE_AS_STATIC
+ #define NETHOST_API
+ #else
+ #define NETHOST_API __declspec(dllimport)
+ #endif
#endif
#define NETHOST_CALLTYPE __stdcall