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 <[email protected]>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=74122
Signed-off-by: Emil Velikov <[email protected]>
---
 src/loader/loader.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/loader/loader.c b/src/loader/loader.c
index 5a36423..626046a 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
-- 
1.8.5.2

_______________________________________________
mesa-dev mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to