]> xenbits.xensource.com Git - libvirt.git/commitdiff
util: Do not use PRIx64 macro
authorOsier Yang <jyang@redhat.com>
Fri, 10 Feb 2012 11:21:53 +0000 (19:21 +0800)
committerOsier Yang <jyang@redhat.com>
Fri, 10 Feb 2012 11:21:53 +0000 (19:21 +0800)
It breaks the build on Mingw32,  because PRIx64 is coming
from the Win32 headers, but virAsprintf uses the gnulib printf.

src/util/virrandom.c

index 630bc003af1360e8d3293da6f463d7efb518eaa4..151cf4bda8d9e73a23afa517a73a17ae98d729b6 100644 (file)
@@ -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;
     }