loader: include dlfcn.h when building with HAVE_LIBUDEV
authorEmil Velikov <emil.l.velikov@gmail.com>
Tue, 28 Jan 2014 10:15:17 +0000 (10:15 +0000)
committerJosé Fonseca <jfonseca@vmware.com>
Tue, 28 Jan 2014 14:32:03 +0000 (14:32 +0000)
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@anholt.net>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=74122
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
src/loader/loader.c

index 6d179a1da961fbac222fd94dc78d696769bb129c..ee4c1e08db7338a20141948b0a4df4274a6cb93c 100644 (file)
 #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