summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2006-12-21 09:16:19 -0800
committerAdam Jackson <ajax@benzedrine.nwnk.net>2007-01-22 17:53:15 -0500
commitfd77f9cbbade5e2e4516c2d755425d07a90d1923 (patch)
tree8fe827bd4d540eaf82d1bc3e0c1e400a3dd2bffe
parentcf7049352009fa013c6da8d21e2242bd2eccfa8f (diff)
Try dlsym(RTLD_DEFAULT) first when finding symbols.
The previous mechanism failed when finding drm symbols now that libdrm has moved to being linked by libdri instead of being linked into the server. (cherry picked from aab2ca204279b638c7e5bb6b8427c58be9704c57 commit)
-rw-r--r--hw/xfree86/loader/dlloader.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/hw/xfree86/loader/dlloader.c b/hw/xfree86/loader/dlloader.c
index a0e867056..2afdef789 100644
--- a/hw/xfree86/loader/dlloader.c
+++ b/hw/xfree86/loader/dlloader.c
@@ -113,6 +113,10 @@ DLFindSymbol(const char *name)
DLModuleList *l;
void *p;
+ p = dlsym(RTLD_DEFAULT, name);
+ if (p != NULL)
+ return p;
+
for (l = dlModuleList; l != NULL; l = l->next) {
p = DLFindSymbolLocal(l->module, name);
if (p)