Commit 58e378a
Fix Linux link error: resolve XFree without an X11 link dep
createSharedContext's GLX path freed the glXChooseFBConfig result with a
direct XFree, but the SDL backend doesn't link libX11 (GLX entry points are
resolved through SDL_GL_GetProcAddress), so the ubuntu Viewer build failed to
link with "undefined reference to XFree".
Resolve XFree from the already-resident libX11 at runtime via SDL_LoadObject /
SDL_LoadFunction, matching how the GLX functions are resolved. On the X11
server path libX11 is always loaded; if it can't be found the array is left
unfreed (a tiny, bounded, once-per-worker leak) rather than crashing.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent 9c0842b commit 58e378a
1 file changed
Lines changed: 15 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
794 | 794 | | |
795 | 795 | | |
796 | 796 | | |
797 | | - | |
| 797 | + | |
| 798 | + | |
| 799 | + | |
| 800 | + | |
| 801 | + | |
| 802 | + | |
| 803 | + | |
| 804 | + | |
| 805 | + | |
| 806 | + | |
| 807 | + | |
| 808 | + | |
| 809 | + | |
| 810 | + | |
| 811 | + | |
798 | 812 | | |
799 | 813 | | |
800 | 814 | | |
| |||
0 commit comments