We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 3729 - Can't build src/video/haiku/SDL_bopengl.cc on x86_64 Haiku Nightly pre-alpha R5.
Summary: Can't build src/video/haiku/SDL_bopengl.cc on x86_64 Haiku Nightly pre-alpha R5.
Status: RESOLVED FIXED
Alias: None
Product: SDL
Classification: Unclassified
Component: video (show other bugs)
Version: HG 2.1
Hardware: x86_64 Haiku
: P2 normal
Assignee: Ryan C. Gordon
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-08-06 23:51 UTC by Vitaly Novichkov
Modified: 2017-08-09 05:02 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Vitaly Novichkov 2017-08-06 23:51:41 UTC
Once I wished to test out latest Haiku (previous release R4 is 5 years old, and on site was a suggestion to try out one of the nightly builds), and I have tried to build my code with my dependencies: Qt 5.9 and SDL2. Qt was built junky (no wonder), and only QMake worked right (I used it to build my non-qt components include an engine that uses SDL2 only). SDL2 have failed to be built on src/video/haiku/SDL_bopengl.cc file: 

The failed code is on 72'th line:

  (image_id) _this->gl_config.dll_handle)

(source type of dll_handle is void*)

I have "fixed" it by adding extra cast into intptr_t (don't know, did I right or it's a bad idea to pass pointer address value by casting with a lower-size integer):

  (image_id)(intptr_t)_this->gl_config.dll_handle)

and it was built fine (except another linking trouble I will report in another post)
Comment 1 Ryan C. Gordon 2017-08-09 05:02:55 UTC
This is fixed in https://hg.libsdl.org/SDL/rev/714324c6dd1f, thanks!

I went with size_t instead of intptr_t, but your approach was correct in any case.

--ryan.