Index: bin/cp/utils.c =================================================================== --- bin/cp/utils.c +++ bin/cp/utils.c @@ -237,9 +237,13 @@ if (use_copy_file_range) { rcount = copy_file_range(from_fd, NULL, to_fd, NULL, SSIZE_MAX, 0); - if (rcount < 0 && errno == EINVAL) { - /* Prob a non-seekable FD */ - use_copy_file_range = 0; + if (rcount < 0) { + switch (errno) { + case EINVAL: + /* Prob a non-seek FD */ + case ENOSYS: + use_copy_file_range = 0; + } } } if (!use_copy_file_range)