On Sun, May 09, 2021 at 07:31:39AM +0000, octeep wrote: > On Sun, May 09, 2021 at 02:04:47PM +0800, Theo Buehler wrote: > > > > +@@ -710,6 +710,8 @@ static GLFWbool initExtensions(void) > > > > + > > > > + #if defined(__CYGWIN__) > > > > + _glfw.x11.xcursor.handle = _glfw_dlopen("libXcursor-1.so"); > > > > ++#elif defined(__OpenBSD__) > > > > ++ _glfw.x11.xcursor.handle = _glfw_dlopen("libXcursor.so.5.0"); > > > > I think it would be better to avoid hardcoding the version. I would > > expect that this also works: > > > > _glfw.x11.xcursor.handle = _glfw_dlopen("libXcursor.so"); > > > > This way you don't need to bump whenver libXcursor is bumped. > > I don't think that will work since there is no libXcursor.so in > /usr/X11R6/lib? >
_glfw_dlopen() is just a wrapper around dlopen(3): #define _glfw_dlopen(name) dlopen(name, RTLD_LAZY | RTLD_LOCAL) For dlopen(3) the version information is optional: Shared libraries take the following form: lib<name>.so[.xx[.yy]] When a shared library is specified without a version or with a partial version, the same library search rules apply that are used for “intrinsic” shared library searches.