From fa50fcb6dddf4d7d0094c26cee802fd942f62727 Mon Sep 17 00:00:00 2001 From: Venky Shankar Date: Wed, 4 Mar 2015 18:05:30 +0530 Subject: geo-rep / gsyncd: use RTLD_GLOBAL while loading libgfchangelog With the RPC based changes to {libgf}changelog, loading shared objects dynamically would need symbols to be available from other shared libraries. As an example, creating an RPC listner loads the RPC transport shared object which requires symbols to be available from already loaded shared objects. Using RTLD_GLOBAL makes the symbols available for symbol resolution of subsequently loaded libraries. Change-Id: I3d3ef790eded82911f05836c707509157680645c BUG: 1170075 Signed-off-by: Venky Shankar Reviewed-on: http://review.gluster.org/9814 Tested-by: Gluster Build System Reviewed-by: Vijay Bellur --- geo-replication/syncdaemon/libgfchangelog.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/geo-replication/syncdaemon/libgfchangelog.py b/geo-replication/syncdaemon/libgfchangelog.py index 89ae032016f..ac5ff05bdfa 100644 --- a/geo-replication/syncdaemon/libgfchangelog.py +++ b/geo-replication/syncdaemon/libgfchangelog.py @@ -9,13 +9,13 @@ # import os -from ctypes import CDLL, create_string_buffer, get_errno, byref, c_ulong +from ctypes import CDLL, RTLD_GLOBAL, create_string_buffer, get_errno, byref, c_ulong from ctypes.util import find_library from syncdutils import ChangelogException class Changes(object): - libgfc = CDLL(find_library("gfchangelog"), use_errno=True) + libgfc = CDLL(find_library("gfchangelog"), mode=RTLD_GLOBAL, use_errno=True) @classmethod def geterrno(cls): -- cgit