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.
Signed-off-by: Christian Gmeiner <christian.gmei...@gmail.com> --- include/GL/internal/dri_interface.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/include/GL/internal/dri_interface.h b/include/GL/internal/dri_interface.h index 36ba65e..4ec3211 100644 --- a/include/GL/internal/dri_interface.h +++ b/include/GL/internal/dri_interface.h @@ -42,6 +42,7 @@ #include <stdio.h> #include <stdlib.h> +#include <string.h> #include <dlfcn.h> #ifdef HAVE_LIBDRM #include <drm.h> @@ -617,6 +618,12 @@ dri_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 _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev