diff options
Diffstat (limited to 'converters/help2man/patches/patch-ab')
-rw-r--r-- | converters/help2man/patches/patch-ab | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/converters/help2man/patches/patch-ab b/converters/help2man/patches/patch-ab new file mode 100644 index 00000000000..41b0deb36f2 --- /dev/null +++ b/converters/help2man/patches/patch-ab @@ -0,0 +1,26 @@ +$NetBSD: patch-ab,v 1.1.1.1 2009/01/17 20:43:27 wiz Exp $ +--- hacklocaledir.c.orig 2003-07-08 10:23:53.000000000 -0400 ++++ hacklocaledir.c +@@ -40,12 +40,21 @@ int __open(char const *path, int flags, + static size_t matchlen; + char *newpath = 0; + int r; +- ++#ifdef RTLD_NEXT + if (!open && !(open = dlsym(RTLD_NEXT, "open"))) + { + fprintf(stderr, PRELOAD ": can't find open(): %s\n", dlerror()); + return -1; + } ++#else ++ void *handle = dlopen(NULL, DL_LAZY); ++ if (!open && !(open = dlsym(handle, "open"))) ++ { ++ fprintf(stderr, PRELOAD ": can't find open(): %s\n", dlerror()); ++ return -1; ++ } ++ dlclose(handle); ++#endif + + if (textdomain || (textdomain = getenv("TEXTDOMAIN"))) + { |