]> git.cworth.org Git - apitrace/blobdiff - glproc_gl.cpp
Don't change behavior of glproc code via RETRACE define.
[apitrace] / glproc_gl.cpp
index d9fb469e3533867efaee1b2ab2acd109462c2a79..27b3ef7dc86706c45c1a9cd290726a73104a5cfd 100644 (file)
@@ -28,9 +28,7 @@
 
 
 #if !defined(_WIN32)
-#ifndef _GNU_SOURCE
-#define _GNU_SOURCE // for dladdr
-#endif
+#include <unistd.h> // for symlink
 #include <dlfcn.h>
 #endif
 
@@ -119,13 +117,11 @@ void * __libgl_sym(const char *symbol)
 
     result = dlsym(__libGlHandle, symbol);
 
-#ifndef RETRACE
-    if (result == dlsym(RTLD_SELF, symbol)) {
+    if (resullt && result == dlsym(RTLD_SELF, symbol)) {
         os::log("apitrace: error: symbol lookup recursion\n");
         os::abort();
         return NULL;
     }
-#endif
 
     return result;
 }