[rtems commit] libdl: Fix dlerror return type

Chris Johns chrisj at rtems.org
Thu Feb 8 22:32:33 UTC 2018


Module:    rtems
Branch:    4.11
Commit:    dc746b50cadae8f367ed3da1b35682ab920e360f
Changeset: http://git.rtems.org/rtems/commit/?id=dc746b50cadae8f367ed3da1b35682ab920e360f

Author:    Patrick Gauvin <gauvin at hcs.ufl.edu>
Date:      Sun Jun 26 12:54:34 2016 -0400

libdl: Fix dlerror return type

POSIX specifies char *, not const char *

Updates #2747

---

 cpukit/libdl/dlfcn.c | 2 +-
 cpukit/libdl/dlfcn.h | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/cpukit/libdl/dlfcn.c b/cpukit/libdl/dlfcn.c
index 55ad97b..c1f4a6a 100644
--- a/cpukit/libdl/dlfcn.c
+++ b/cpukit/libdl/dlfcn.c
@@ -126,7 +126,7 @@ dlsym (void* handle, const char *symbol)
   return symval;
 }
 
-const char*
+char*
 dlerror (void)
 {
   static char msg[64];
diff --git a/cpukit/libdl/dlfcn.h b/cpukit/libdl/dlfcn.h
index 1ac3ba1..d71b515 100644
--- a/cpukit/libdl/dlfcn.h
+++ b/cpukit/libdl/dlfcn.h
@@ -56,7 +56,7 @@ int	dladdr(void * __restrict, Dl_info * __restrict);
 int	dlctl(void *, int, void *);
 #endif
 int	dlinfo(void *, int, void *);
-const char *dlerror(void);
+char *dlerror(void);
 __END_DECLS
 
 /* Values for dlopen `mode'. */




More information about the vc mailing list