From c42497af4e2816542ad635de0ff7a4292e4a0aac Mon Sep 17 00:00:00 2001 From: phintuka Date: Mon, 19 Jul 2010 13:33:27 +0000 Subject: FreeBSD dlerror() returns const char * (Thanks to Juergen Lock) --- frontend_local.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/frontend_local.c b/frontend_local.c index 31256c0a..6a16e128 100644 --- a/frontend_local.c +++ b/frontend_local.c @@ -4,7 +4,7 @@ * See the main source file 'xineliboutput.c' for copyright information and * how to reach the author. * - * $Id: frontend_local.c,v 1.48 2010-05-26 11:54:26 phintuka Exp $ + * $Id: frontend_local.c,v 1.49 2010-07-19 13:33:27 phintuka Exp $ * */ @@ -284,9 +284,8 @@ frontend_t *cXinelibLocal::load_frontend(const char *fe_name) } if( !(lib = dlopen (libname, RTLD_LAZY | RTLD_GLOBAL))) { - char *dl_error_msg = dlerror(); - LOGERR("load_frontend: cannot dlopen file %s: %s", - libname, dl_error_msg); + LOGERR("load_frontend: cannot dlopen file %s: %s", libname, dlerror()); + } else if ( (fe_creator = (fe_creator_f*)dlsym(lib, "fe_creator"))) { LOGDBG("load_frontend: entry at %p", fe_creator); frontend_t *fe = (**fe_creator)(); -- cgit v1.2.3