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 )