[PATCH 02/11] libdl: Fix dlerror non-conformance
chrisj at rtems.org
chrisj at rtems.org
Tue Feb 5 01:42:55 UTC 2019
From: Chris Johns <chrisj at rtems.org>
Closes #3298
---
cpukit/libdl/dlfcn.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/cpukit/libdl/dlfcn.c b/cpukit/libdl/dlfcn.c
index 1d7164539b..b97078cbaa 100644
--- a/cpukit/libdl/dlfcn.c
+++ b/cpukit/libdl/dlfcn.c
@@ -129,7 +129,10 @@ const char*
dlerror (void)
{
static char msg[64];
- rtems_rtl_get_error (msg, sizeof (msg));
+ int eno;
+ eno = rtems_rtl_get_error (msg, sizeof (msg));
+ if (eno == 0)
+ return NULL;
return msg;
}
--
2.19.1
More information about the devel
mailing list