aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/hw/xfree86/loader
diff options
context:
space:
mode:
Diffstat (limited to 'xorg-server/hw/xfree86/loader')
-rw-r--r--xorg-server/hw/xfree86/loader/Makefile.am1
-rw-r--r--xorg-server/hw/xfree86/loader/loadmod.c7
-rw-r--r--xorg-server/hw/xfree86/loader/sdksyms.sh1
3 files changed, 7 insertions, 2 deletions
diff --git a/xorg-server/hw/xfree86/loader/Makefile.am b/xorg-server/hw/xfree86/loader/Makefile.am
index 0bfa7a283..d3c17d173 100644
--- a/xorg-server/hw/xfree86/loader/Makefile.am
+++ b/xorg-server/hw/xfree86/loader/Makefile.am
@@ -21,6 +21,7 @@ libloader_la_SOURCES = \
dlloader.c \
os.c \
sdksyms.c
+libloader_la_LIBADD = $(DLOPEN_LIBS)
CLEANFILES = sdksyms.c sdksyms.dep
diff --git a/xorg-server/hw/xfree86/loader/loadmod.c b/xorg-server/hw/xfree86/loader/loadmod.c
index 0b220f1b6..5b175a546 100644
--- a/xorg-server/hw/xfree86/loader/loadmod.c
+++ b/xorg-server/hw/xfree86/loader/loadmod.c
@@ -399,8 +399,11 @@ FindModuleInSubdir(const char *dirpath, const char *module)
while ((direntry = readdir(dir))) {
if (direntry->d_name[0] == '.')
continue;
- if ((stat(direntry->d_name, &stat_buf) == 0) && S_ISDIR(stat_buf.st_mode)) {
- snprintf(tmpBuf, PATH_MAX, "%s/%s", dirpath, direntry->d_name);
+ snprintf(tmpBuf, PATH_MAX, "%s%s/", dirpath, direntry->d_name);
+ /* the stat with the appended / fails for normal files,
+ and works for sub dirs fine, looks a bit strange in strace
+ but does seem to work */
+ if ((stat(tmpBuf, &stat_buf) == 0) && S_ISDIR(stat_buf.st_mode)) {
if ((ret = FindModuleInSubdir(tmpBuf, module)))
break;
continue;
diff --git a/xorg-server/hw/xfree86/loader/sdksyms.sh b/xorg-server/hw/xfree86/loader/sdksyms.sh
index 11865472f..eea024063 100644
--- a/xorg-server/hw/xfree86/loader/sdksyms.sh
+++ b/xorg-server/hw/xfree86/loader/sdksyms.sh
@@ -2,6 +2,7 @@
cat > sdksyms.c << EOF
/* This file is automatically generated by sdksyms.sh. */
+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
#ifdef HAVE_XORG_CONFIG_H
#include <xorg-config.h>