From 2f5df0fac8fdc0df5572b61bce6590f978c948f4 Mon Sep 17 00:00:00 2001 From: paulbeach Date: Thu, 27 Aug 2009 11:25:58 +0000 Subject: [PATCH] Minor mod. as per James Gregurich to allow compilation under gcc 4.2 --- src/jrd/os/darwin/mod_loader.cpp | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/jrd/os/darwin/mod_loader.cpp b/src/jrd/os/darwin/mod_loader.cpp index 397bbac1e5..6b94769ed4 100644 --- a/src/jrd/os/darwin/mod_loader.cpp +++ b/src/jrd/os/darwin/mod_loader.cpp @@ -90,16 +90,18 @@ ModuleLoader::Module* ModuleLoader::loadModule(const Firebird::PathName& modPath debugPrint("object file setup failure"); return 0; case NSObjectFileImageInappropriateFile: + { // try to load as dynamic library - void* mod = dlopen(modPath.c_str(), RTLD_LAZY); - if (mod) - { + void* mod = dlopen(modPath.c_str(), RTLD_LAZY); + if (mod) + { return FB_NEW(*getDefaultMemoryPool()) DarwinModule(NSModule(), mod); - } - else - { + } + else + { debugPrint("not a Mach-O MH_BUNDLE file type or dynamic library"); return 0; + } } case NSObjectFileImageArch: debugPrint("no object for this architecture");