Re: [PATCH 3/3] virnuma: Actually build huge page code

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

 



On 06/23/14 15:59, Michal Privoznik wrote:
> One of previous commits (e6258a33) tried to build the huge page code
> only on Linux since it's Linux centric indeed. But it failed miserably
> as it used 'WITH_LINUX' which is an automake conditional not a gcc
> one. In the sources we need to use __linux__.

Sigh. I shouldn't touch any code today ...

> 
> Signed-off-by: Michal Privoznik <mprivozn@xxxxxxxxxx>
> ---
>  src/util/virnuma.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/src/util/virnuma.c b/src/util/virnuma.c
> index 4901378..a0fa31c 100644
> --- a/src/util/virnuma.c
> +++ b/src/util/virnuma.c
> @@ -513,7 +513,7 @@ virNumaGetDistances(int node ATTRIBUTE_UNUSED,
>  
>  
>  /* currently all the hugepage stuff below is linux only */
> -#if WITH_LINUX
> +#if __linux__

#ifdef

>  
>  # define HUGEPAGES_NUMA_PREFIX "/sys/devices/system/node/"
>  # define HUGEPAGES_SYSTEM_PREFIX "/sys/kernel/mm/hugepages/"
> @@ -861,7 +861,7 @@ virNumaGetPages(int node,
>  }
>  
>  
> -#else /* #if WITH_LINUX */
> +#else /* #ifdef __linux__ */
>  int
>  virNumaGetPageInfo(int node ATTRIBUTE_UNUSED,
>                     unsigned int page_size ATTRIBUTE_UNUSED,
> @@ -886,4 +886,4 @@ virNumaGetPages(int node ATTRIBUTE_UNUSED,
>                     _("page info is not supported on this platform"));
>      return -1;
>  }
> -#endif /* #if WITH_LINUX */
> +#endif /* #ifdef __linux__ */
> 

ACK with the macro fixed.

Peter

Attachment: signature.asc
Description: OpenPGP digital signature

--
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]