glx: use anonymous namespace to avoid -Wodr issues when building with LTO enabled
[mesa.git] / src / glx / tests / query_renderer_implementation_unittest.cpp
index 35b3972d57f58018d46ee7f2181d33e66a5940ef..c4bc170ed554fe1ec739e38fb15a9d9d13cacf40 100644 (file)
 
 #if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL)
 
-extern "C" {
 #include "glxclient.h"
 #include "glx_error.h"
 #include "dri2.h"
-#include "dri_interface.h"
+#include "GL/internal/dri_interface.h"
 #include "dri2_priv.h"
-}
 
-struct attribute_test_vector {
-   const char *glx_string;
-   const char *dri_string;
-   int glx_attribute;
-   int dri_attribute;
-};
+namespace {
+   struct attribute_test_vector {
+      const char *glx_string;
+      const char *dri_string;
+      int glx_attribute;
+      int dri_attribute;
+   };
+}
 
 #define E(g, d) { # g, # d, g, d }
 
@@ -140,7 +140,7 @@ fake_queryString(__DRIscreen *screen, int attribute, const char **val)
    return -1;
 }
 
-struct __DRI2rendererQueryExtensionRec rendererQueryExt = {
+static const __DRI2rendererQueryExtension rendererQueryExt = {
    { __DRI2_RENDERER_QUERY, 1 },
 
    fake_queryInteger,