Signed-off-by: Manolo de Medici <manolo.demedici@gmail.com>
diff --git a/block/file-posix.c b/block/file-posix.c
index 35684f7e21..05426abb7d 100644
--- a/block/file-posix.c
+++ b/block/file-posix.c
@@ -1999,7 +1999,7 @@ static int handle_aiocb_write_zeroes_unmap(void *opaque)
return handle_aiocb_write_zeroes(aiocb);
}
-#ifndef HAVE_COPY_FILE_RANGE
+#if !defined(HAVE_COPY_FILE_RANGE) && !defined(__GNU__)
static off_t copy_file_range(int in_fd, off_t *in_off, int out_fd,
off_t *out_off, size_t len, unsigned int flags)
{
---
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 35684f7e21..05426abb7d 100644
--- a/block/file-posix.c
+++ b/block/file-posix.c
@@ -1999,7 +1999,7 @@ static int handle_aiocb_write_zeroes_unmap(void *opaque)
return handle_aiocb_write_zeroes(aiocb);
}
-#ifndef HAVE_COPY_FILE_RANGE
+#if !defined(HAVE_COPY_FILE_RANGE) && !defined(__GNU__)
static off_t copy_file_range(int in_fd, off_t *in_off, int out_fd,
off_t *out_off, size_t len, unsigned int flags)
{
--
2.43.0