* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
+ * License along with this library; if not, see <http://www.gnu.org/licenses/>.
*/
/*
/*
* MT safe
*/
+#include "config.h"
#include <dlfcn.h>
gpointer handle;
handle = dlopen (file_name,
- (bind_local ? 0 : RTLD_GLOBAL) | (bind_lazy ? RTLD_LAZY : RTLD_NOW));
+ (bind_local ? 0 : RTLD_GLOBAL) | (bind_lazy ? RTLD_LAZY : RTLD_NOW));
if (!handle)
g_module_set_error (fetch_dlerror (TRUE));
* are required on some systems.
*/
+#ifdef __BIONIC__
+ handle = RTLD_DEFAULT;
+#else
handle = dlopen (NULL, RTLD_GLOBAL | RTLD_LAZY);
+#endif
if (!handle)
g_module_set_error (fetch_dlerror (TRUE));
const gchar *symbol_name)
{
gpointer p;
-
+ gchar *msg;
+
+ fetch_dlerror (FALSE);
p = dlsym (handle, symbol_name);
- if (!p)
- g_module_set_error (fetch_dlerror (FALSE));
+ msg = fetch_dlerror (FALSE);
+ if (msg)
+ g_module_set_error (msg);
return p;
}