diff options
author | lloyd <[email protected]> | 2010-08-10 17:52:47 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2010-08-10 17:52:47 +0000 |
commit | 4523387ee69adeb13177aa62305a16e877c7b4c3 (patch) | |
tree | 5e989aa9fe0478891c8e0be54ec2013c2a5dd56f /src/utils | |
parent | db104ed8303910a945249b424bb36b6976e364bd (diff) |
Workaround problem with GCC 3 - it doesn't like you casting pointers
to pointers-to-functions (which, admittedly, is undefined in ISO C++,
but doing this is required to use dlopen). Using the dumb hammer of a
C-style cast works, though.
Diffstat (limited to 'src/utils')
-rw-r--r-- | src/utils/dyn_load/dyn_load.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/utils/dyn_load/dyn_load.h b/src/utils/dyn_load/dyn_load.h index d5476b389..56277d3e4 100644 --- a/src/utils/dyn_load/dyn_load.h +++ b/src/utils/dyn_load/dyn_load.h @@ -43,7 +43,11 @@ class Dynamically_Loaded_Library template<typename T> T resolve(const std::string& symbol) { +#if defined(__GNUC__) && __GNUC__ < 4 + return (T)(resolve_symbol(symbol)); +#else return reinterpret_cast<T>(resolve_symbol(symbol)); +#endif } private: |