diff --git a/src/dynamic_load.c b/src/dynamic_load.c index f3bf9cde01a51e5febc5e5238f1e87c471f57473..a752bc4b7563c961b530cd87f72a9e5409693d93 100644 --- a/src/dynamic_load.c +++ b/src/dynamic_load.c @@ -6,6 +6,10 @@ # include "module.h" # include "stralloc.h" # include "pike_macros.h" +#ifdef DEBUG +#include "main.h" +#endif /* DEBUG */ + #endif #if !defined(HAVE_DLOPEN) && defined(HAVE_DLD_LINK) && defined(HAVE_DLD_GET_FUNC) @@ -98,6 +102,11 @@ void f_load_module(INT32 args) module_name = sp[-args].u.string->str; module=dlopen(module_name, RTLD_NOW); +#ifdef DEBUG + if (d_flag >= 1) { + fprintf(stderr, "dlopen() called.\n"); + } +#endif /* DEBUG */ if(!module) { const char *err = dlerror();