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>
This commit is contained in:
Damien Zammit
2026-02-08 05:59:45 +00:00
committed by Paolo Bonzini
parent 9c5fbd478f
commit aa744e614a

View File

@@ -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,