@samitouri / QOSamiQemu / commits / aa744e614a

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 <damien@zamaudio.com> Link: https://lore.kernel.org/r/20260208055858.2166524-6-damien@zamaudio.com Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

Damien Zammit committed Feb 8, 2026 at 05:59 UTC aa744e614a461c7feee8d8171aaeee0e21527ebf
1 file changed +1 -1
block/file-posix.c
+1 -1
@@ -2091,7 +2091,7 @@ static int handle_aiocb_write_zeroes_unmap(void *opaque)
2091 }
2092
2093 #ifndef HAVE_COPY_FILE_RANGE
2094 -#ifndef EMSCRIPTEN
2094 +#if !defined(EMSCRIPTEN) && !defined(__GNU__)
2095 static
2096 #endif
2097 ssize_t copy_file_range(int in_fd, off_t *in_off, int out_fd,