$NetBSD$

--- Zend/zend_extensions.c.orig	2007-09-05 00:24:04.000000000 +0200
+++ Zend/zend_extensions.c
@@ -230,7 +230,7 @@ ZEND_API zend_extension *zend_get_extens
  *
  */
 
-#if HAVE_MACH_O_DYLD_H
+#if defined(HAVE_MACH_O_DYLD_H) && !defined(HAVE_LIBDL)
 
 void *zend_mh_bundle_load(char* bundle_path)
 {
@@ -284,7 +284,7 @@ const char *zend_mh_bundle_error(void)
 	return NULL;
 }
 
-#endif /* HAVE_MACH_O_DYLD_H */
+#endif /* HAVE_MACH_O_DYLD_H && !HAVE_LIBDL */
 
 /*
  * Local variables:
