glx: use anonymous namespace to avoid -Wodr issues when building with LTO enabled
[mesa.git] / src / glx / tests / query_renderer_implementation_unittest.cpp
index 6ec4c4f803048dcc68da5a9ba1744086af6beb80..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 }
 
@@ -141,10 +141,10 @@ fake_queryString(__DRIscreen *screen, int attribute, const char **val)
 }
 
 static const __DRI2rendererQueryExtension rendererQueryExt = {
-   .base = { __DRI2_RENDERER_QUERY, 1 },
+   { __DRI2_RENDERER_QUERY, 1 },
 
-   .queryInteger = fake_queryInteger,
-   .queryString = fake_queryString
+   fake_queryInteger,
+   fake_queryString
 };
 
 void dri2_query_renderer_string_test::SetUp()