Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 504f4a9

Browse files
committed
Don't require <dlfcn.h> -- rely on existence of dlopen().
1 parent 6ba1120 commit 504f4a9

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

Python/importdl.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ typedef void (*dl_funcptr)();
129129
#endif
130130
#endif
131131

132-
#if !defined(DYNAMIC_LINK) && defined(HAVE_DLFCN_H) && (defined(HAVE_DLOPEN) || defined(M_UNIX))
132+
#if !defined(DYNAMIC_LINK) && (defined(HAVE_DLOPEN) || defined(M_UNIX))
133133
#define DYNAMIC_LINK
134134
#define USE_SHLIB
135135
#endif
@@ -155,8 +155,10 @@ static void aix_loaderror(char *);
155155
#include <nlist.h>
156156
#include <link.h>
157157
#else
158+
#ifdef HAVE_DLFCN_H
158159
#include <dlfcn.h>
159160
#endif
161+
#endif
160162
#ifndef _DL_FUNCPTR_DEFINED
161163
typedef void (*dl_funcptr)();
162164
#endif

0 commit comments

Comments
 (0)