diff options
Diffstat (limited to 'community/postgresql-mysql_fdw/fix-RTLD_DEEPBIND-check.patch')
-rw-r--r-- | community/postgresql-mysql_fdw/fix-RTLD_DEEPBIND-check.patch | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/community/postgresql-mysql_fdw/fix-RTLD_DEEPBIND-check.patch b/community/postgresql-mysql_fdw/fix-RTLD_DEEPBIND-check.patch new file mode 100644 index 00000000000..e7d3d41637a --- /dev/null +++ b/community/postgresql-mysql_fdw/fix-RTLD_DEEPBIND-check.patch @@ -0,0 +1,30 @@ +From 9f09213157acd7ecce4490d687f42d5ca95cf57d Mon Sep 17 00:00:00 2001 +From: Alex Webb <alexwebb2@gmail.com> +Date: Tue, 19 May 2020 16:56:53 -0500 +Subject: [PATCH] Add RTLD_DEEPBIND existence check + +Checks for `RTLD_DEEPBIND` directly, rather than checking for `__APPLE__` and `__FreeBSD__` + +This was causing build failures in Alpine Linux, which uses `musl` instead of `glibc` and does not include `RTLD_DEEPBIND`: + +https://git.musl-libc.org/cgit/musl/tree/include/dlfcn.h + +Patch-Source: https://github.com/EnterpriseDB/mysql_fdw/pull/196 + +diff --git a/mysql_fdw.c b/mysql_fdw.c +--- a/mysql_fdw.c ++++ b/mysql_fdw.c +@@ -255,10 +255,10 @@ + bool + mysql_load_library(void) + { +-#if defined(__APPLE__) || defined(__FreeBSD__) ++#if !defined(RTLD_DEEPBIND) + /* +- * Mac OS/BSD does not support RTLD_DEEPBIND, but it still works without +- * the RTLD_DEEPBIND ++ * Some implementations do not support RTLD_DEEPBIND, but it still ++ * works without the RTLD_DEEPBIND + */ + mysql_dll_handle = dlopen(_MYSQL_LIBNAME, RTLD_LAZY); + #else |