Commit 50806eeea2b2eec3b5c78fb570bac8e8e029df19

Jerome Duval 2019-11-11T22:04:10

haiku: use addr_t instead of size_t for OpenGL dynamic loading. Partially fixes Bugzilla #4442.

diff --git a/src/video/haiku/SDL_bopengl.cc b/src/video/haiku/SDL_bopengl.cc
index 5065e9f..44b21fe 100644
--- a/src/video/haiku/SDL_bopengl.cc
+++ b/src/video/haiku/SDL_bopengl.cc
@@ -54,7 +54,7 @@ int HAIKU_GL_LoadLibrary(_THIS, const char *path)
         if( get_image_symbol(info.id, "glBegin", B_SYMBOL_TYPE_ANY,
                 &location) == B_OK) {
 
-            _this->gl_config.dll_handle = (void *) (size_t) info.id;
+            _this->gl_config.dll_handle = (void *) (addr_t) info.id;
             _this->gl_config.driver_loaded = 1;
             SDL_strlcpy(_this->gl_config.driver_path, "libGL.so",
                     SDL_arraysize(_this->gl_config.driver_path));
@@ -69,7 +69,7 @@ void *HAIKU_GL_GetProcAddress(_THIS, const char *proc)
         void *location = NULL;
         status_t err;
         if ((err =
-            get_image_symbol((image_id) (size_t) _this->gl_config.dll_handle,
+            get_image_symbol((image_id) (addr_t) _this->gl_config.dll_handle,
                               proc, B_SYMBOL_TYPE_ANY,
                               &location)) == B_OK) {
             return location;