diff --git a/src/dynamic_load.c b/src/dynamic_load.c
index a752bc4b7563c961b530cd87f72a9e5409693d93..75565d8621e1382aa698d5bc625edec527fd6228 100644
--- a/src/dynamic_load.c
+++ b/src/dynamic_load.c
@@ -6,10 +6,6 @@
 #  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)
@@ -102,11 +98,7 @@ 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();