[libvirt] [PATCH 3/7] Don't import loop.h unless HAVE_DECL_LO_FLAGS_AUTOCLEAR is defined

Eric Blake eblake at redhat.com
Thu Mar 7 17:42:49 UTC 2013


On 03/07/2013 09:41 AM, Daniel P. Berrange wrote:
> From: "Daniel P. Berrange" <berrange at redhat.com>
> 
> The loop.h on RHEL4 is broken and cannot be imported. We already
> detect this in configure as a side-effect of looking for whether
> LO_FLAGS_AUTOCLEAR is available. We protected the impl with
> HAVE_DECL_LO_FLAGS_AUTOCLEAR, but not the header import
> 
> Signed-off-by: Daniel P. Berrange <berrange at redhat.com>
> ---
>  src/util/virfile.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/src/util/virfile.c b/src/util/virfile.c
> index eec9bcc..9f79daf 100644
> --- a/src/util/virfile.c
> +++ b/src/util/virfile.c
> @@ -32,7 +32,8 @@
>  #include <unistd.h>
>  #include <dirent.h>
>  
> -#ifdef __linux__
> +#if defined(__linux__) && HAVE_DECL_LO_FLAGS_AUTOCLEAR
> +# include <sys/types.h>

Drop the #include <sys/types.h> line, it adds nothing.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 621 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20130307/5ce1dc66/attachment-0001.sig>


More information about the libvir-list mailing list