]> git.cworth.org Git - fips/blobdiff - glxwrap.c
dlwrap: Add new dlwrap_dlopen_libfips function
[fips] / glxwrap.c
index d7d4191ce528ae5b59c5f8a9317b8e99a179d679..cccc05f99e1295b0c51165cf226e61164cec956d 100644 (file)
--- a/glxwrap.c
+++ b/glxwrap.c
@@ -47,10 +47,14 @@ glXSwapBuffers (Display *dpy, GLXDrawable drawable)
  */
 void (*glXGetProcAddressARB (const GLubyte *func))(void)
 {
+       static void *libfips_handle = NULL;
        void *ret;
 
+       if (libfips_handle == NULL)
+               libfips_handle = dlwrap_dlopen_libfips ();
+
        /* If our library has this symbol, that's what we want to give. */
-       ret = dlwrap_real_dlsym (NULL, (const char *) func);
+       ret = dlwrap_real_dlsym (libfips_handle, (const char *) func);
        if (ret)
                return ret;