From a700e18600bc5dcdcca8f18a3e00996c40590025 Mon Sep 17 00:00:00 2001 From: Anthony Baxter Date: Wed, 21 Nov 2001 05:01:44 +0000 Subject: [PATCH] backport of patches 2.10, 2.11, 2.12, by MvL. . Patch #455231: Support ELF properly on OpenBSD. . Patch to bug #472202: Correctly recognize NetBSD before 199712. . Move dlfcn.h block out of NetBSD block, assuming that NetBSD before 199712 didn't have dlfcn.h, or that it wouldn't conflict with the other stuff defined. --- Python/dynload_shlib.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/Python/dynload_shlib.c b/Python/dynload_shlib.c index 7c8bfd2c3b7e..170c18b7b929 100644 --- a/Python/dynload_shlib.c +++ b/Python/dynload_shlib.c @@ -6,17 +6,21 @@ #include #include -#if defined(__NetBSD__) && (NetBSD < 199712) + +#if defined(__NetBSD__) +#include +#if (NetBSD < 199712) #include #include #define dlerror() "error in dynamic linking" -#else +#endif +#endif /* NetBSD */ + #ifdef HAVE_DLFCN_H #include #endif -#endif -#ifdef __OpenBSD__ +#if (defined(__OpenBSD__) || defined(__NetBSD__)) && !defined(__ELF__) #define LEAD_UNDERSCORE "_" #else #define LEAD_UNDERSCORE "" -- 2.47.3