-rw-r--r-- | gcl/o/cfun.c | 6 |
diff --git a/gcl/o/cfun.c b/gcl/o/cfun.c index ed6443030..873348c72 100644 --- a/gcl/o/cfun.c +++ b/gcl/o/cfun.c @@ -117,7 +117,7 @@ DEFUN("DLADDR",object,fSdladdr,SI,1,1,NONE,OI,OO,OO,OO,(fixnum ad),"") { DEFUN("DLOPEN",object,fSdlopen,SI,1,1,NONE,OO,OO,OO,OO,(object name),"") { - char ch; + char ch,*err; void *v; dlerror(); @@ -125,8 +125,8 @@ DEFUN("DLOPEN",object,fSdlopen,SI,1,1,NONE,OO,OO,OO,OO,(object name),"") { name->st.st_self[name->st.st_fillp]=0; v=dlopen(name->st.st_fillp ? name->st.st_self : 0,RTLD_LAZY|RTLD_GLOBAL); name->st.st_self[name->st.st_fillp]=ch; - if (dlerror()) - FEerror("dlopen faiure on ~s",1,name); + if ((err=dlerror())) + FEerror("dlopen failure on ~s: ~s",2,name,make_simple_string(err)); RETURN1(make_fixnum((fixnum)v)); |