The build system for libvirt correctly detects the location of blkid
using PKG_CONFIG_PATH environment variable. The file blkid.pc states
that the include flags should be: 'Cflags: -I${includedir}/blkid' but
libvirt searches for blkid.h inside ${includedir}/blkid/blkid, which is
wrong. Until now, the compilation for libvirt succeeded because of pure
luck, as it had -I/usr/include as a CFLAG. This issue was faced while
compiling libvirt on Ubuntu 16.04.2 with bare minimum dev packages and a
custom compiled blkid kept in a non-standard $prefix.
Signed-off-by: Nehal J Wani <nehaljw.kkd1@gmail.com>
#endif
#if WITH_BLKID
-# include <blkid/blkid.h>
+# include <blkid.h>
#endif
#if WITH_SELINUX
#endif
#if WITH_BLKID
-# include <blkid/blkid.h>
+# include <blkid.h>
#endif
#if WITH_SELINUX