From: morgana Date: Fri, 1 Feb 2002 07:03:49 +0000 (+0000) Subject: dlopen should use RTLD_LAZY instead of RTLD_NOW on NetBSD. Patch #502168. X-Git-Tag: point-backport-1-5-2~74 X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?p=netatalk.git;a=commitdiff_plain;h=5b29b22386133e3ccd20f87f3ae3e5640dfc61a1 dlopen should use RTLD_LAZY instead of RTLD_NOW on NetBSD. Patch #502168. --- diff --git a/include/atalk/util.h b/include/atalk/util.h index 1765fd68..8dc3a7a6 100644 --- a/include/atalk/util.h +++ b/include/atalk/util.h @@ -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)