This fixes compilation error for non-bsd systems that happen to return
const char* from dlerror().
No reason not to, since const char* is assignable from char*.
--
Csaba/Jester
diff --git a/simgear/screen/extensions.cxx b/simgear/screen/extensions.cxx
index 7429c0f..130673c 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);
}
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel