diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2021-06-11 06:59:13 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2021-06-11 06:59:13 (GMT) |
commit | 4427df1ae86acb1ff37c450bdf3e66e83c7917bd (patch) | |
tree | 116454fc385887a3957cd88c45da03866e29c9b3 /generic/tclZipfs.c | |
parent | d1e77398a88c782621e53c1697ab594399d0fa3b (diff) | |
parent | 19c1bb0cf64575d065c510cd1ceefba34fc51eef (diff) | |
download | tcl-4427df1ae86acb1ff37c450bdf3e66e83c7917bd.zip tcl-4427df1ae86acb1ff37c450bdf3e66e83c7917bd.tar.gz tcl-4427df1ae86acb1ff37c450bdf3e66e83c7917bd.tar.bz2 |
protect all usage of dladdr() with !defined(NO_DLFCN_H)
Diffstat (limited to 'generic/tclZipfs.c')
-rw-r--r-- | generic/tclZipfs.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/generic/tclZipfs.c b/generic/tclZipfs.c index 303ea03..4d43331 100644 --- a/generic/tclZipfs.c +++ b/generic/tclZipfs.c @@ -16,7 +16,6 @@ * projects. */ -#define _GNU_SOURCE #include "tclInt.h" #include "tclFileSystem.h" @@ -33,7 +32,7 @@ #define TBLS 1 #endif -#if 1 /* HAVE_DLADDR */ +#if !defined(NO_DLFCN_H) #include <dlfcn.h> #endif @@ -3912,7 +3911,7 @@ TclZipfs_TclLibrary(void) if (ZipfsAppHookFindTclInit(dllName) == TCL_OK) { return Tcl_NewStringObj(zipfs_literal_tcl_library, -1); } -#elif 1 +#elif !defined(NO_DLFCN_H) Dl_info dlinfo; if (dladdr(TclZipfs_TclLibrary, &dlinfo) && (dlinfo.dli_fname != NULL) && (ZipfsAppHookFindTclInit(dlinfo.dli_fname) == TCL_OK)) { |