summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPedro Alves <palves@redhat.com>2015-10-30 22:06:30 +0000
committerPedro Alves <palves@redhat.com>2015-11-03 16:29:59 +0000
commitcfb841a97858ba199a383413af0d5a765b45da57 (patch)
tree5cbc26d7f03866c0d734734e1ba950259b13d0c4
parent5af7f0ffa9a7d0264b15f7a1c7fafe7c63f408dc (diff)
downloadbinutils-gdb-cfb841a97858ba199a383413af0d5a765b45da57.tar.gz
[C++/mingw] gdb-dlfcn.c casts
Fixes: ../../src/gdb/gdb-dlfcn.c: In function 'void* gdb_dlsym(void*, const char*)': ../../src/gdb/gdb-dlfcn.c:105:49: error: invalid conversion from 'void*' to 'HMODULE {aka HINSTANCE__*}' [-fpermissive] return (void *) GetProcAddress (handle, symbol); ^ gdb/ChangeLog: 2015-11-01 Pedro Alves <palves@redhat.com> * gdb-dlfcn.c (gdb_dlsym, gdb_dlclose) [__MINGW32__]: Add casts to HMODULE.
-rw-r--r--gdb/gdb-dlfcn.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gdb/gdb-dlfcn.c b/gdb/gdb-dlfcn.c
index fb6dc5fd595..fbd3a499008 100644
--- a/gdb/gdb-dlfcn.c
+++ b/gdb/gdb-dlfcn.c
@@ -102,7 +102,7 @@ gdb_dlsym (void *handle, const char *symbol)
#ifdef HAVE_DLFCN_H
return dlsym (handle, symbol);
#elif __MINGW32__
- return (void *) GetProcAddress (handle, symbol);
+ return (void *) GetProcAddress ((HMODULE) handle, symbol);
#endif
}
@@ -112,7 +112,7 @@ gdb_dlclose (void *handle)
#ifdef HAVE_DLFCN_H
return dlclose (handle);
#elif __MINGW32__
- return !((int) FreeLibrary (handle));
+ return !((int) FreeLibrary ((HMODULE) handle));
#endif
}