[libvirt] [PATCH] util: Do not use PRIx64 macro

Osier Yang jyang at redhat.com
Fri Feb 10 11:26:32 UTC 2012


On 2012年02月10日 20:05, Osier Yang wrote:
> It breaks the build on Mingw32,  because PRIx64 is coming
> from the Win32 headers, but virAsprintf uses the gnulib printf.

It's pushed under build breaking rule.

> ---
>   src/util/virrandom.c |    4 ++--
>   1 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/src/util/virrandom.c b/src/util/virrandom.c
> index 630bc00..151cf4b 100644
> --- a/src/util/virrandom.c
> +++ b/src/util/virrandom.c
> @@ -123,8 +123,8 @@ virRandomGenerateWWN(char **wwn,
>           return -1;
>       }
> 
> -    if (virAsprintf(wwn, "5" "%s%09" PRIx64,
> -                    oui, virRandomBits(36))<  0) {
> +    if (virAsprintf(wwn, "5" "%s%09llx", oui,
> +                    (unsigned long long)virRandomBits(36))<  0) {
>           virReportOOMError();
>           return -1;
>       }




More information about the libvir-list mailing list