Re: [PATCH 1/N] qemu driver FreeBSD support: fix compilation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Dec 11, 2012 at 23:08:07 +0400, Roman Bogorodskiy wrote:
> Another round of the FreeBSD patches. Here's the first chunk to fix
> compilation.
> 
> Roman Bogorodskiy
...
> diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c
> index ab04599..5d355eb 100644
> --- a/src/qemu/qemu_process.c
> +++ b/src/qemu/qemu_process.c
> @@ -27,7 +27,12 @@
>  #include <sys/stat.h>
>  #include <sys/time.h>
>  #include <sys/resource.h>
> +#if defined(__linux__)
>  #include <linux/capability.h>
> +#elif defined(__FreeBSD__)
> +#include <sys/param.h>
> +#include <sys/cpuset.h>
> +#endif

In libvirt, we indent nested preprocesor directives, thus the above should
look as follows:

#if defined(__linux__)
# include <linux/capability.h>
#elif defined(__FreeBSD__)
# include <sys/param.h>
# include <sys/cpuset.h>
#endif

make syntax-check is able to detect this kind of issues if you have cppi
installed. And it seems devel/cppi is available in FreeBSD ports so it should
be easy enough to get :-)

Jirka

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


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]