From 58fc5c89c6d5a577f3e259f54cfbb7f91c58a50a Mon Sep 17 00:00:00 2001 From: Esme Povirk Date: Mon, 18 Apr 2022 11:12:02 -0500 Subject: [PATCH] Fix getting errno in copy_file_range_ctypes. For #5769. --- proton | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/proton b/proton index 7a412e3b..84f99955 100755 --- a/proton +++ b/proton @@ -200,8 +200,8 @@ def copy_file_range_ctypes(fd_in, fd_out, count): if __syscall__copy_file_range is None: c_int64_p = POINTER(c_int64) prototype = CFUNCTYPE(c_ssize_t, c_long, c_int, c_int64_p, - c_int, c_int64_p, c_size_t, c_uint) - __syscall__copy_file_range = prototype(('syscall', CDLL(None))) + c_int, c_int64_p, c_size_t, c_uint, use_errno=True) + __syscall__copy_file_range = prototype(('syscall', CDLL(None, use_errno=True))) while True: ret = __syscall__copy_file_range(__NR_copy_file_range, fd_in, None, fd_out, None, count, 0)