summaryrefslogtreecommitdiffstats
path: root/src/loader/loader.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/loader/loader.c')
-rw-r--r--src/loader/loader.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/loader/loader.c b/src/loader/loader.c
index fe90307765c..fd05f08e64f 100644
--- a/src/loader/loader.c
+++ b/src/loader/loader.c
@@ -396,3 +396,22 @@ loader_set_logger(void (*logger)(int level, const char *fmt, ...))
{
log_ = logger;
}
+
+/* XXX: Local definition to avoid pulling the heavyweight GL/gl.h and
+ * GL/internal/dri_interface.h
+ */
+
+#ifndef __DRI_DRIVER_GET_EXTENSIONS
+#define __DRI_DRIVER_GET_EXTENSIONS "__driDriverGetExtensions"
+#endif
+
+char *
+loader_get_extensions_name(const char *driver_name)
+{
+ char *name = NULL;
+
+ if (asprintf(&name, "%s_%s", __DRI_DRIVER_GET_EXTENSIONS, driver_name) < 0)
+ return NULL;
+
+ return name;
+}