]> arthur.barton.de Git - netatalk.git/commitdiff
dlopen should use RTLD_LAZY instead of RTLD_NOW on NetBSD. Patch #502168.
authormorgana <morgana>
Fri, 1 Feb 2002 07:03:49 +0000 (07:03 +0000)
committermorgana <morgana>
Fri, 1 Feb 2002 07:03:49 +0000 (07:03 +0000)
include/atalk/util.h

index 1765fd68080b2544048c5460b37ffb01ba6a32c0..8dc3a7a66268c7d687df9d2025ea122563767fe6 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: util.h,v 1.6 2001-12-10 20:15:13 srittau Exp $
+ * $Id: util.h,v 1.7 2002-02-01 07:03:49 morgana Exp $
  */
 
 #ifndef _ATALK_UTIL_H
@@ -39,7 +39,12 @@ extern void mod_close    __P((void *));
 #define RTLD_NOW 1
 #endif /* ! RTLD_NOW */
 
+/* NetBSD doesn't like RTLD_NOW for dlopen (it fails). Use RTLD_LAZY. */
+#ifdef __NetBSD__
+#define mod_open(a)      dlopen(a, RTLD_LAZY)
+#else /* ! __NetBSD__ */
 #define mod_open(a)      dlopen(a, RTLD_NOW)
+#endif /* __NetBSD__ */
 
 #ifndef DLSYM_PREPEND_UNDERSCORE
 #define mod_symbol(a, b) dlsym(a, b)