Ticket #522: xapian.patch

File xapian.patch, 539 bytes (added by David F. Skoll, 14 years ago)

Simple patch to Xapian.pm to pass RTLD_GLOBAL to dlopen() in DynaLoader

  • Xapian.pm

    diff --git a/Xapian.pm b/Xapian.pm
    index 643edc1..d071721 100644
    a b require DynaLoader;  
    3838
    3939our @ISA = qw(DynaLoader);
    4040
     41# We need to use the RTLD_GLOBAL flag to dlopen() so that other C++
     42# modules that link against libxapian.so get the *same* value for all the
     43# weak symbols (eg, the exception classes)
     44sub dl_load_flags { 0x01 }
     45
    4146# This allows declaration       use Search::Xapian ':all';
    4247# If you do not need this, moving things directly into @EXPORT or @EXPORT_OK
    4348# will save memory.