Fix ivshmem build on 32-bit hosts
stat() fields can be more or less anything depending on configuration, cast explicitly to uint64_t to avoid printf() format mismatches. Signed-off-by: Avi Kivity <avi@redhat.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
This commit is contained in:
		
							parent
							
								
									c93031e56a
								
							
						
					
					
						commit
						ad0a4ac1c0
					
				@ -351,9 +351,10 @@ static int check_shm_size(IVShmemState *s, int fd) {
 | 
				
			|||||||
    fstat(fd, &buf);
 | 
					    fstat(fd, &buf);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if (s->ivshmem_size > buf.st_size) {
 | 
					    if (s->ivshmem_size > buf.st_size) {
 | 
				
			||||||
        fprintf(stderr, "IVSHMEM ERROR: Requested memory size greater");
 | 
					        fprintf(stderr,
 | 
				
			||||||
        fprintf(stderr, " than shared object size (%" PRIu64 " > %ld)\n",
 | 
					                "IVSHMEM ERROR: Requested memory size greater"
 | 
				
			||||||
                                          s->ivshmem_size, buf.st_size);
 | 
					                " than shared object size (%" PRIu64 " > %" PRIu64")\n",
 | 
				
			||||||
 | 
					                s->ivshmem_size, (uint64_t)buf.st_size);
 | 
				
			||||||
        return -1;
 | 
					        return -1;
 | 
				
			||||||
    } else {
 | 
					    } else {
 | 
				
			||||||
        return 0;
 | 
					        return 0;
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user