diff options
author | Christian Gmeiner <[email protected]> | 2016-11-09 15:50:05 +0100 |
---|---|---|
committer | Emil Velikov <[email protected]> | 2016-11-15 15:55:33 +0000 |
commit | 0890aa6f7fdbe33721b8ef2039608390c5aa886e (patch) | |
tree | 9e7738b5c774ed9247ae8e2f4785163f0691f6a4 /src/loader/loader.c | |
parent | 0639e253a5fe796e0815ada86086f6e64d1a701a (diff) |
loader: add loader_get_extensions_name(..) helper
Changes since v1:
- renamed function to loader_get_extensions_name
- moved function into loader
Signed-off-by: Christian Gmeiner <[email protected]>
V2: [Emil Velikov]
- Use local define.
Signed-off-by: Emil Velikov <[email protected]>
Diffstat (limited to 'src/loader/loader.c')
-rw-r--r-- | src/loader/loader.c | 19 |
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; +} |