Skip to content

Commit 87d67ff

Browse files
krajmstsirkin
authored andcommitted
contrib/vhost-user-blk: Replace lseek64 with lseek
64bit off_t is already in use since build uses _FILE_OFFSET_BITS=64 already. Using lseek/off_t also makes it work with latest musl without using _LARGEFILE64_SOURCE macro. This macro is implied with _GNU_SOURCE when using glibc but not with musl. Signed-off-by: Khem Raj <[email protected]> Cc: Michael S. Tsirkin <[email protected]> CC: Raphael Norwitz <[email protected]> Message-Id: <[email protected]> Reviewed-by: Michael S. Tsirkin <[email protected]> Signed-off-by: Michael S. Tsirkin <[email protected]> Reviewed-by: Philippe Mathieu-Daudé <[email protected]> Reviewed-by: Raphael Norwitz <[email protected]>
1 parent e7ee4fe commit 87d67ff

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

contrib/vhost-user-blk/vhost-user-blk.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -532,9 +532,9 @@ vub_get_blocksize(int fd)
532532
static void
533533
vub_initialize_config(int fd, struct virtio_blk_config *config)
534534
{
535-
off64_t capacity;
535+
off_t capacity;
536536

537-
capacity = lseek64(fd, 0, SEEK_END);
537+
capacity = lseek(fd, 0, SEEK_END);
538538
config->capacity = capacity >> 9;
539539
config->blk_size = vub_get_blocksize(fd);
540540
config->size_max = 65536;

0 commit comments

Comments
 (0)