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 <vshankar@redhat.com>
Reviewed-on: http://review.gluster.org/9814
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
This commit is contained in:
Venky Shankar 2015-03-04 18:05:30 +05:30 committed by Vijay Bellur
parent 4737584fff
commit fa50fcb6dd

View File

@ -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):