mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-30 18:50:18 +03:00
qemu: Fix build on 32-bit platforms
Commits c2518f7bc7 and 28a0621528 introduced build failures on 32-bit platforms by using incorrect format specifiers with g_strdup_printf. In one case, an 'unsigned long' format specifier is used with a 'long long int' variable. Fix by changing the format specifier to 'uintmax_t', and casting the variable likewise. In a second case, an 'unsigned long' format specifier is used with a 'size_t' variable, which is 'unsigned int' on 32-bit systems. Fix by changing the format specifier to use the 'z' modifier. Fixes: c2518f7bc7dd4f8ab8655a12ec3a000e1eb5b232 Fixes: 28a06215280b99708ed8dc2d183f62ba7b34ccf8 Signed-off-by: Jim Fehlig <jfehlig@suse.com> Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
This commit is contained in:
parent
ddb8305049
commit
6bd9b06484
@ -2259,8 +2259,8 @@ qemuMonitorMigrateToFdSet(virDomainObj *vm,
|
||||
qemuFDPassAddFD(fdPassMigrate, directFd, "-directio-fd");
|
||||
qemuFDPassTransferMonitor(fdPassMigrate, mon);
|
||||
|
||||
uri = g_strdup_printf("file:%s,offset=%#lx",
|
||||
qemuFDPassGetPath(fdPassMigrate), offset);
|
||||
uri = g_strdup_printf("file:%s,offset=%#jx",
|
||||
qemuFDPassGetPath(fdPassMigrate), (uintmax_t)offset);
|
||||
ret = qemuMonitorJSONMigrate(mon, flags, uri);
|
||||
|
||||
return ret;
|
||||
|
@ -4917,7 +4917,7 @@ qemuProcessIncomingDefNew(virQEMUDriver *driver,
|
||||
} else {
|
||||
qemuFDPassAddFD(inc->fdPassMigrate, fd, "-buffered-fd");
|
||||
}
|
||||
inc->uri = g_strdup_printf("file:%s,offset=%#lx",
|
||||
inc->uri = g_strdup_printf("file:%s,offset=%#zx",
|
||||
qemuFDPassGetPath(inc->fdPassMigrate), offset);
|
||||
} else {
|
||||
inc->uri = qemuMigrationDstGetURI(migrateFrom, *fd);
|
||||
|
Loading…
x
Reference in New Issue
Block a user