Mesa (master): loader: include dlfcn.h when building with HAVE_LIBUDEV

Jose Fonseca jrfonseca at kemper.freedesktop.org
Tue Jan 28 14:36:09 UTC 2014


Module: Mesa
Branch: master
Commit: 61c825e862c3215f0611a6c46d6530438d72028c
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=61c825e862c3215f0611a6c46d6530438d72028c

Author: Emil Velikov <emil.l.velikov at gmail.com>
Date:   Tue Jan 28 10:15:17 2014 +0000

loader: include dlfcn.h when building with HAVE_LIBUDEV

The code depending on the definitions is already wrapped
in the same conditional so go ahead and wrap the include.

Otherwise we'll brake compilation on platforms that are
missing the header. Add assert.h in there as well, as it
is introduced and used in the same fashon.

Cc: Eric Anholt <eric at anholt.net>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=74122
Signed-off-by: Emil Velikov <emil.l.velikov at gmail.com>

---

 src/loader/loader.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/loader/loader.c b/src/loader/loader.c
index 6d179a1..ee4c1e0 100644
--- a/src/loader/loader.c
+++ b/src/loader/loader.c
@@ -67,8 +67,10 @@
 #include <stdarg.h>
 #include <stdio.h>
 #include <string.h>
+#ifdef HAVE_LIBUDEV
 #include <assert.h>
 #include <dlfcn.h>
+#endif
 #include "loader.h"
 
 #ifndef __NOT_HAVE_DRM_H




More information about the mesa-commit mailing list