libdl: Fix dlerror non-conformance

Closes #3298
This commit is contained in:
Chris Johns
2019-02-02 15:19:59 +11:00
parent 2d8a9c794c
commit e2f13430be

View File

@@ -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;
}