$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 2010-11-15 09:10:15.000000000 +0000 +++ include/atalk/util.h @@ -17,6 +17,7 @@ #include #include +#include #ifdef HAVE_UNISTD_H #include #endif /* HAVE_UNISTD_H */ @@ -78,7 +79,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__ */