From e2f13430be3c74fade1319b97f6d21641152c732 Mon Sep 17 00:00:00 2001 From: Chris Johns Date: Sat, 2 Feb 2019 15:19:59 +1100 Subject: [PATCH] libdl: Fix dlerror non-conformance 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; }