unix: reset error status in uv_dlopen()
Fixes a bug where uv_dlopen() mistakenly reported failure because of previous errors.
This commit is contained in:
parent
e0c6114e32
commit
84f0d96ae0
@ -31,6 +31,7 @@ static int uv__dlerror(uv_lib_t* lib);
|
||||
|
||||
|
||||
int uv_dlopen(const char* filename, uv_lib_t* lib) {
|
||||
dlerror(); /* Reset error status. */
|
||||
lib->errmsg = NULL;
|
||||
lib->handle = dlopen(filename, RTLD_LAZY);
|
||||
return uv__dlerror(lib);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user