$NetBSD: patch-ap,v 1.8 2011/04/11 20:22:59 markd Exp $

Fix build on DragonFlyBSD

Fixes loading of pam modules on older versions on NetBSD, where
the dependency of the module on libpam was not explicit.

--- include/atalk/util.h.orig	2013-05-24 22:25:30.000000000 +0900
+++ include/atalk/util.h	2013-06-07 07:13:50.000000000 +0900
@@ -108,7 +108,7 @@ extern void mod_close    (void *);
  * OpenBSD currently does not use the second arg for dlopen(). For
  * future compatibility we define DL_LAZY */
 #ifdef __NetBSD__
-#define mod_open(a)      dlopen(a, RTLD_LAZY)
+#define mod_open(a)      dlopen(a, RTLD_LAZY|RTLD_GLOBAL)
 #elif defined(__OpenBSD__)
 #define mod_open(a)      dlopen(a, DL_LAZY)
 #else /* ! __NetBSD__ && ! __OpenBSD__ */
