[Mesa-dev] [PATCH v2 3/3] loader: fixup driver names if needed
Christian Gmeiner
christian.gmeiner at gmail.com
Wed Nov 9 14:50:07 UTC 2016
This makes it possible to 'use' the imx-drm driver. Remeber that it
is not possible to have sysmbol names in C/C++ with a '-' in it.
Changes since v1:
- none
Signed-off-by: Christian Gmeiner <christian.gmeiner at gmail.com>
---
src/loader/loader.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/src/loader/loader.c b/src/loader/loader.c
index 69c23cd..091fcc1 100644
--- a/src/loader/loader.c
+++ b/src/loader/loader.c
@@ -408,5 +408,11 @@ loader_get_extensions_name(const char *driver_name)
if (asprintf(&name, "%s_%s", __DRI_DRIVER_GET_EXTENSIONS, driver_name) < 0)
return NULL;
+ const size_t len = strlen(name);
+ for (size_t i = 0; i < len; i++) {
+ if (name[i] == '-')
+ name[i] = '_';
+ }
+
return name;
}
--
2.7.4
More information about the mesa-dev
mailing list