summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/loader/loader.c19
-rw-r--r--src/loader/loader.h2
2 files changed, 21 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;
+}
diff --git a/src/loader/loader.h b/src/loader/loader.h
index d404f5b67fc..84314a4fc04 100644
--- a/src/loader/loader.h
+++ b/src/loader/loader.h
@@ -65,6 +65,8 @@ loader_get_user_preferred_fd(int default_fd, int *different_device);
void
loader_set_logger(void (*logger)(int level, const char *fmt, ...));
+char *
+loader_get_extensions_name(const char *driver_name);
#ifdef __cplusplus
}