The branch main has been updated by dchagin:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=7307c4396347af670dc86e2e7a9dfadb55e1c458

commit 7307c4396347af670dc86e2e7a9dfadb55e1c458
Author:     Dmitry Chagin <[email protected]>
AuthorDate: 2023-08-17 19:57:17 +0000
Commit:     Dmitry Chagin <[email protected]>
CommitDate: 2023-08-17 19:57:17 +0000

    linux(4): Use native off_t for fo_sendfile call
    
    MFC after:              1 month
---
 sys/compat/linux/linux_socket.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/sys/compat/linux/linux_socket.c b/sys/compat/linux/linux_socket.c
index 48db95d240cb..45b94cb2f994 100644
--- a/sys/compat/linux/linux_socket.c
+++ b/sys/compat/linux/linux_socket.c
@@ -2376,7 +2376,7 @@ out:
 
 static int
 linux_sendfile_common(struct thread *td, l_int out, l_int in,
-    l_loff_t *offset, l_size_t count)
+    off_t *offset, l_size_t count)
 {
        off_t bytes_read;
        int error;
@@ -2447,8 +2447,8 @@ linux_sendfile(struct thread *td, struct 
linux_sendfile_args *arg)
         *   returns 0.  We use the 'bytes read' parameter to get this value.
         */
 
-       l_loff_t offset64;
-       l_long offset;
+       off_t offset64;
+       l_off_t offset;
        int ret;
        int error;
 
@@ -2456,7 +2456,7 @@ linux_sendfile(struct thread *td, struct 
linux_sendfile_args *arg)
                error = copyin(arg->offset, &offset, sizeof(offset));
                if (error != 0)
                        return (error);
-               offset64 = (l_loff_t)offset;
+               offset64 = offset;
        }
 
        ret = linux_sendfile_common(td, arg->out, arg->in,
@@ -2468,7 +2468,7 @@ linux_sendfile(struct thread *td, struct 
linux_sendfile_args *arg)
                if (offset64 > INT32_MAX)
                        return (EOVERFLOW);
 #endif
-               offset = (l_long)offset64;
+               offset = (l_off_t)offset64;
                error = copyout(&offset, arg->offset, sizeof(offset));
                if (error != 0)
                        return (error);
@@ -2483,7 +2483,7 @@ linux_sendfile(struct thread *td, struct 
linux_sendfile_args *arg)
 int
 linux_sendfile64(struct thread *td, struct linux_sendfile64_args *arg)
 {
-       l_loff_t offset;
+       off_t offset;
        int ret;
        int error;
 

Reply via email to