summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2013-12-12 10:55:32 -0800
committerEric Anholt <eric@anholt.net>2013-12-12 10:58:55 -0800
commit8d8334c350e8979c23bd9fe7c942693fcf76f958 (patch)
treebe7eec0c5e99b0a0ff1b416c6af74ee8df660a01 /src
parentd6e4e9ac4c93ac517e8ef98d8dbcb1867b483229 (diff)
Use the right library name for GLX on OS X.
Diffstat (limited to 'src')
-rw-r--r--src/dispatch_common.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/dispatch_common.c b/src/dispatch_common.c
index f24d090..b8b9184 100644
--- a/src/dispatch_common.c
+++ b/src/dispatch_common.c
@@ -102,6 +102,12 @@
#include "dispatch_common.h"
+#ifdef __APPLE__
+#define GLX_LIB "/opt/X11/lib/libGL.1.dylib"
+#else
+#define GLX_LIB "libGL.so.1"
+#endif
+
struct api {
#ifndef _WIN32
/**
@@ -327,7 +333,7 @@ epoxy_egl_dlsym(const char *name)
void *
epoxy_glx_dlsym(const char *name)
{
- return do_dlsym(&api.glx_handle, "libGL.so.1", name, true);
+ return do_dlsym(&api.glx_handle, GLX_LIB, name, true);
}
void *
@@ -419,7 +425,7 @@ epoxy_get_proc_address(const char *name)
return egl_gpa(name);
#endif /* PLATFORM_HAS_EGL */
- return do_dlsym(&api.glx_handle, "libGL.so.1", "glXGetProcAddressARB",
+ return do_dlsym(&api.glx_handle, GLX_LIB, "glXGetProcAddressARB",
false);
if (glx_gpa)
return glx_gpa((const GLubyte *)name);