When calling dlerror() in a non-dynamically linked executable, return a pointer

to an error string rather than NULL (`no errors occured) to indicate the cause
of failure return values of other dl*() interfaces.
This commit is contained in:
kleink 1999-05-19 14:47:12 +00:00
parent cbd39e5f67
commit 28d76befd4

View File

@ -1,4 +1,4 @@
/* $NetBSD: common.c,v 1.1 1999/03/19 23:34:49 thorpej Exp $ */
/* $NetBSD: common.c,v 1.2 1999/05/19 14:47:12 kleink Exp $ */
/*
* Copyright (c) 1995 Christopher G. Demetriou
@ -121,7 +121,7 @@ dlerror()
{
if (__mainprog_obj == NULL)
return NULL;
return ("Dynamic linker interface not available");
return (__mainprog_obj->dlerror)();
}
#endif /* DYNAMIC */