From aa744e614a461c7feee8d8171aaeee0e21527ebf Mon Sep 17 00:00:00 2001 From: Damien Zammit Date: Sun, 8 Feb 2026 05:59:45 +0000 Subject: [PATCH] Make copy_file_range non-static on GNU/Hurd glibc has a stubs mechanism: a function can be declared in the system headers, but only implemented as a stub that always fails with ENOSYS, for example. Therefore when implementing this function we cannot use static. Signed-off-by: Damien Zammit Link: https://lore.kernel.org/r/20260208055858.2166524-6-damien@zamaudio.com Signed-off-by: Paolo Bonzini --- block/file-posix.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block/file-posix.c b/block/file-posix.c index 5998448b1e..3c985da94f 100644 --- a/block/file-posix.c +++ b/block/file-posix.c @@ -2091,7 +2091,7 @@ static int handle_aiocb_write_zeroes_unmap(void *opaque) } #ifndef HAVE_COPY_FILE_RANGE -#ifndef EMSCRIPTEN +#if !defined(EMSCRIPTEN) && !defined(__GNU__) static #endif ssize_t copy_file_range(int in_fd, off_t *in_off, int out_fd,