[PATCH] util: Do not use PRIx64 macro

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

 



It breaks the build on Mingw32,  because PRIx64 is coming
from the Win32 headers, but virAsprintf uses the gnulib printf.
---
 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;
     }
-- 
1.7.7.3

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