Hi Emil, 2016-11-03 17:02 GMT+01:00 Emil Velikov <[email protected]>: > On 3 November 2016 at 14:25, Christian Gmeiner > <[email protected]> wrote: >> Signed-off-by: Christian Gmeiner <[email protected]> >> --- >> include/GL/internal/dri_interface.h | 14 ++++++++++++++ >> 1 file changed, 14 insertions(+) >> >> diff --git a/include/GL/internal/dri_interface.h >> b/include/GL/internal/dri_interface.h >> index d0b1bc6..36ba65e 100644 >> --- a/include/GL/internal/dri_interface.h >> +++ b/include/GL/internal/dri_interface.h >> @@ -40,6 +40,9 @@ >> #ifndef DRI_INTERFACE_H >> #define DRI_INTERFACE_H >> >> +#include <stdio.h> >> +#include <stdlib.h> >> +#include <dlfcn.h> >> #ifdef HAVE_LIBDRM >> #include <drm.h> >> #else >> @@ -606,6 +609,17 @@ struct __DRIuseInvalidateExtensionRec { >> */ >> #define __DRI_DRIVER_GET_EXTENSIONS "__driDriverGetExtensions" >> >> +static inline char * >> +dri_get_extensions_name(const char *driver_name) >> +{ >> + char *name = NULL; >> + >> + if (asprintf(&name, "%s_%s", __DRI_DRIVER_GET_EXTENSIONS, >> driver_name) < 0) >> + return NULL; >> + > asprintf is a GNU extension and is missing on MSVC at least. I'm not > sure if the includes are ok/needed. >
I can rewrite it to use malloc() and snprintf() directly and MSVC should be happy to. > Please move that anywhere in src/loader/ - be that new or existing file. > I can try to put the function directly into loader.[hc] and could rename it to loader_get_extensions_name(..). greets -- Christian Gmeiner, MSc https://soundcloud.com/christian-gmeiner _______________________________________________ mesa-dev mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/mesa-dev
