]> git.mxchange.org Git - simgear.git/commitdiff
Csaba Halasz: fix a compilation error for non-bsd systems that happen to return
authorehofman <ehofman>
Tue, 23 Mar 2010 08:19:43 +0000 (08:19 +0000)
committerTim Moore <timoore33@gmail.com>
Sat, 27 Mar 2010 12:39:37 +0000 (13:39 +0100)
const char* from dlerror().

simgear/screen/extensions.cxx

index 7429c0f54d605cd667417ce362701473376a06e3..130673c51f92c7654a1ba47c36b865a4ce14c3e5 100644 (file)
@@ -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);
     }