summaryrefslogtreecommitdiff
path: root/src/vm/method.cpp
diff options
context:
space:
mode:
authorKamil Rytarowski <n54@gmx.com>2016-02-01 03:57:17 +0100
committerKamil Rytarowski <n54@gmx.com>2016-02-01 03:57:17 +0100
commit6dd67631b3ae3eea18fc9e5ebfa61d8ed779d59f (patch)
tree400ab0e76e8cd89132b3ede0d6ae1393a3536714 /src/vm/method.cpp
parent23ad0044be6798502ffa9a7c78a5dd39839f9e33 (diff)
downloadcoreclr-6dd67631b3ae3eea18fc9e5ebfa61d8ed779d59f.tar.gz
coreclr-6dd67631b3ae3eea18fc9e5ebfa61d8ed779d59f.tar.bz2
coreclr-6dd67631b3ae3eea18fc9e5ebfa61d8ed779d59f.zip
Fix build on NetBSD, casting pointer to function to pointer to data
/tmp/pkgsrc-tmp/wip/coreclr-git/work/coreclr/src/vm/method.cpp:5196:16: error: cannot initialize return object of type 'LPVOID' (aka 'void *') with an rvalue of type 'FARPROC' (aka 'long (*)()') return GetProcAddress(hMod, (LPCSTR)(size_t)((UINT16)ordinal)); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1 error generated.
Diffstat (limited to 'src/vm/method.cpp')
-rw-r--r--src/vm/method.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/vm/method.cpp b/src/vm/method.cpp
index 4268b0b2a4..ae98743073 100644
--- a/src/vm/method.cpp
+++ b/src/vm/method.cpp
@@ -5193,7 +5193,7 @@ LPVOID NDirectMethodDesc::FindEntryPoint(HINSTANCE hMod) const
if (GetEntrypointName()[0] == '#')
{
long ordinal = atol(GetEntrypointName()+1);
- return GetProcAddress(hMod, (LPCSTR)(size_t)((UINT16)ordinal));
+ return reinterpret_cast<LPVOID>(GetProcAddress(hMod, (LPCSTR)(size_t)((UINT16)ordinal)));
}
// Just look for the unmangled name. If it is unicode fcn, we are going