diff options
author | Vinson Lee <[email protected]> | 2014-06-09 18:07:07 -0700 |
---|---|---|
committer | Vinson Lee <[email protected]> | 2014-07-14 22:21:10 -0700 |
commit | e945a19b35025c962131b2c4b7393461445f08f2 (patch) | |
tree | a3f9da6553e6a0a5cd466ff7e49e1d3c2342ae41 /src/mapi/glapi/gen | |
parent | c25fe88ebf0939ac1972cc0994819c27408ca59e (diff) |
glapi: Use GetProcAddress instead of dlsym on Windows.
This patch fixes this MinGW build error.
glapi_gentable.c: In function '_glapi_create_table_from_handle':
glapi_gentable.c:123:9: error: implicit declaration of function 'dlsym' [-Werror=implicit-function-declaration]
*procp = dlsym(handle, symboln);
^
Signed-off-by: Vinson Lee <[email protected]>
Acked-by: Brian Paul <[email protected]>
Diffstat (limited to 'src/mapi/glapi/gen')
-rw-r--r-- | src/mapi/glapi/gen/gl_gentable.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/mapi/glapi/gen/gl_gentable.py b/src/mapi/glapi/gen/gl_gentable.py index d45a5e0ffc3..9db6a773a99 100644 --- a/src/mapi/glapi/gen/gl_gentable.py +++ b/src/mapi/glapi/gen/gl_gentable.py @@ -134,7 +134,11 @@ body_template = """ if(!disp->%(name)s) { void ** procp = (void **) &disp->%(name)s; snprintf(symboln, sizeof(symboln), "%%s%(entry_point)s", symbol_prefix); +#ifdef _WIN32 + *procp = GetProcAddress(handle, symboln); +#else *procp = dlsym(handle, symboln); +#endif } """ |