summaryrefslogtreecommitdiffstats
path: root/src/glx
diff options
context:
space:
mode:
Diffstat (limited to 'src/glx')
-rw-r--r--src/glx/indirect_init.h8
-rw-r--r--src/glx/tests/indirect_api.cpp2
2 files changed, 8 insertions, 2 deletions
diff --git a/src/glx/indirect_init.h b/src/glx/indirect_init.h
index 2ba01f56c3f..7fe9a96495d 100644
--- a/src/glx/indirect_init.h
+++ b/src/glx/indirect_init.h
@@ -36,6 +36,14 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "glxclient.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
extern struct _glapi_table *__glXNewIndirectAPI(void);
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
#endif /* _INDIRECT_INIT_H_ */
diff --git a/src/glx/tests/indirect_api.cpp b/src/glx/tests/indirect_api.cpp
index 52469a771c2..34304a185e4 100644
--- a/src/glx/tests/indirect_api.cpp
+++ b/src/glx/tests/indirect_api.cpp
@@ -45,11 +45,9 @@
#include <gtest/gtest.h>
#include "main/glheader.h"
-extern "C" {
#include "../indirect_init.h"
#include "glapi/glapi.h"
#include "../../mesa/main/dispatch.h"
-}
static const void *nil = 0;