[libvirt] [PATCH] Fix location of blkid.h in include header

Nehal J Wani posted 1 patch 7 years, 1 month ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/20170303154209.32536-1-nehaljw.kkd1@gmail.com
src/lxc/lxc_container.c    | 2 +-
src/storage/storage_util.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
[libvirt] [PATCH] Fix location of blkid.h in include header
Posted by Nehal J Wani 7 years, 1 month ago
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>
---
 src/lxc/lxc_container.c    | 2 +-
 src/storage/storage_util.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/lxc/lxc_container.c b/src/lxc/lxc_container.c
index 99bd7e9..e306b6e 100644
--- a/src/lxc/lxc_container.c
+++ b/src/lxc/lxc_container.c
@@ -49,7 +49,7 @@
 #endif
 
 #if WITH_BLKID
-# include <blkid/blkid.h>
+# include <blkid.h>
 #endif
 
 #if WITH_SELINUX
diff --git a/src/storage/storage_util.c b/src/storage/storage_util.c
index a665bac..41253b9 100644
--- a/src/storage/storage_util.c
+++ b/src/storage/storage_util.c
@@ -39,7 +39,7 @@
 #endif
 
 #if WITH_BLKID
-# include <blkid/blkid.h>
+# include <blkid.h>
 #endif
 
 #if WITH_SELINUX
-- 
2.7.4

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH] Fix location of blkid.h in include header
Posted by Michal Privoznik 7 years, 1 month ago
On 03/03/2017 04:42 PM, Nehal J Wani wrote:
> 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>
> ---
>  src/lxc/lxc_container.c    | 2 +-
>  src/storage/storage_util.c | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)

ACKed and pushed.

Michal

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list