From: ehofman Date: Tue, 23 Mar 2010 08:19:43 +0000 (+0000) Subject: Csaba Halasz: fix a compilation error for non-bsd systems that happen to return X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=44c93d5074a26133379a6f4e60547b17a05e1d71;p=simgear.git Csaba Halasz: fix a compilation error for non-bsd systems that happen to return const char* from dlerror(). --- diff --git a/simgear/screen/extensions.cxx b/simgear/screen/extensions.cxx index 7429c0f5..130673c5 100644 --- a/simgear/screen/extensions.cxx +++ b/simgear/screen/extensions.cxx @@ -121,11 +121,7 @@ void *SGGetGLProcAddress(const char *func) { libHandle = dlopen(NULL, RTLD_LAZY); if (!libHandle) { -#if defined (__FreeBSD__) const char *error = dlerror(); -#else - char *error = dlerror(); -#endif if (error) { SG_LOG(SG_GENERAL, SG_INFO, error); return 0; @@ -145,11 +141,7 @@ void *SGGetGLProcAddress(const char *func) { } else if (libHandle != NULL) { fptr = dlsym(libHandle, func); -#if defined (__FreeBSD__) const char *error = dlerror(); -#else - char *error = dlerror(); -#endif if (error) SG_LOG(SG_GENERAL, SG_INFO, error); }