Fixed bug 5075 - Don't assume a GL library version number on NetBSD.
authorSam Lantinga
Sun, 05 Apr 2020 09:01:33 -0700
changeset 13690699e489c7bb6
parent 13689 c3055b205671
child 13691 10a795c0dd52
Fixed bug 5075 - Don't assume a GL library version number on NetBSD.

Nia Alarie

If you install X as part of NetBSD, the GL library is libGL.so.3, but if you install the GL library later as a package, it's libGL.so.1.
src/video/x11/SDL_x11opengl.c
     1.1 --- a/src/video/x11/SDL_x11opengl.c	Sun Apr 05 08:58:47 2020 -0700
     1.2 +++ b/src/video/x11/SDL_x11opengl.c	Sun Apr 05 09:01:33 2020 -0700
     1.3 @@ -32,8 +32,12 @@
     1.4  #include "SDL_loadso.h"
     1.5  #include "SDL_x11opengles.h"
     1.6  
     1.7 -#if defined(__IRIX__)
     1.8 -/* IRIX doesn't have a GL library versioning system */
     1.9 +#if defined(__IRIX__) || defined(__NetBSD__)
    1.10 +/*
    1.11 + * IRIX doesn't have a GL library versioning system.
    1.12 + * NetBSD has different GL library versions depending on how the library was
    1.13 + * installed (package vs. xsrc).
    1.14 + */
    1.15  #define DEFAULT_OPENGL  "libGL.so"
    1.16  #elif defined(__MACOSX__)
    1.17  #define DEFAULT_OPENGL  "/opt/X11/lib/libGL.1.dylib"