[PATCH 3/5] libdl: Fix dlerror return type
Chris Johns
chrisj at rtems.org
Thu Feb 8 03:47:19 UTC 2018
POSIX specifies char *, not const char *
Updates #3298
---
cpukit/include/dlfcn.h | 2 +-
cpukit/libdl/dlfcn.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/cpukit/include/dlfcn.h b/cpukit/include/dlfcn.h
index 1ac3ba1330..95272c43ca 100644
--- a/cpukit/include/dlfcn.h
+++ b/cpukit/include/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'. */
diff --git a/cpukit/libdl/dlfcn.c b/cpukit/libdl/dlfcn.c
index 55ad97b753..c1f4a6a7b6 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];
--
2.14.1
More information about the devel
mailing list