Browse Source

Fixed incorrect flag settings for shared object loading

master
Artyom Beilis 7 years ago
parent
commit
a5d6da2baf
2 changed files with 4 additions and 3 deletions
  1. +2
    -2
      booster/booster/shared_object.h
  2. +2
    -1
      booster/lib/shared_object/src/shared_object.cpp

+ 2
- 2
booster/booster/shared_object.h View File

@@ -23,8 +23,8 @@ namespace booster {
public:
static const int load_lazy = 1; /// Pass RTLD_LAZY to dlopen
static const int load_now = 2; /// Pass RTLD_NOW to dlopen
static const int load_global = 3; /// Pass RTLD_GLOBAL to dlopen
static const int load_local = 4; /// Pass RTLD_LOCAL to dlopen
static const int load_global = 4; /// Pass RTLD_GLOBAL to dlopen
static const int load_local = 8; /// Pass RTLD_LOCAL to dlopen
///
/// Create an empty shared object
///


+ 2
- 1
booster/lib/shared_object/src/shared_object.cpp View File

@@ -10,6 +10,7 @@
#else
#include <dlfcn.h>
#endif
#include <iostream>

namespace booster {
#ifdef BOOSTER_WIN_NATIVE
@@ -147,7 +148,7 @@ namespace booster {
dlflags |= RTLD_GLOBAL;
if(flags & load_local)
dlflags |= RTLD_LOCAL;
d->handle = dlopen(file_name.c_str(),flags);
d->handle = dlopen(file_name.c_str(),dlflags);
if(!d->handle) {
error_message = dlerror();
return false;


Loading…
Cancel
Save