From 693c95fa93d762f332c6594f2cf105ff07b266f5 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Thu, 12 Jun 2014 17:13:58 +0000 Subject: [PATCH] Fix wxDynamicLibrary compilation under Solaris. Add const_cast<> needed for the call to dladdr() to compile. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76694 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/unix/dlunix.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/unix/dlunix.cpp b/src/unix/dlunix.cpp index c51aedf92c..1905c97aca 100644 --- a/src/unix/dlunix.cpp +++ b/src/unix/dlunix.cpp @@ -287,7 +287,8 @@ void* wxDynamicLibrary::GetModuleFromAddress(const void* addr, wxString* path) #ifdef HAVE_DLADDR Dl_info di = { 0 }; - if ( dladdr(addr, &di) == 0 ) + // At least under Solaris dladdr() takes non-const void*. + if ( dladdr(const_cast(addr), &di) == 0 ) return NULL; if ( path )