This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] fix HPUX-PA build on posix.cc


Its probably cleaner just to drop the "const" in the _Jv_platform_dladdr() declaration. I can't see any reason for that.

Bryce

Andreas Tobler wrote:
Hello all,

this one fixes a build error on HPUX-PA.

Ok for trunk?

Andreas


2006-06-30 Andreas Tobler <a.tobler@schweiz.ch>


* posix.cc (_Jv_platform_dladdr): Cast away const when calling dladdr().

Index: posix.cc
===================================================================
--- posix.cc    (revision 115104)
+++ posix.cc    (working copy)
@@ -219,7 +219,7 @@

 #if defined (HAVE_DLFCN_H) && defined (HAVE_DLADDR)
   Dl_info addr_info;
-  ret_val = dladdr (addr, &addr_info);
+  ret_val = dladdr (const_cast<void *>(addr), &addr_info);
   if (ret_val != 0)
     {
       info->file_name = addr_info.dli_fname;


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]