[libc-commits] [PATCH] D133022: [libc] Fix seek_func to use SYS__llseek if possible

Dong-hee Na via Phabricator via libc-commits libc-commits at lists.llvm.org
Wed Aug 31 07:39:01 PDT 2022


corona10 created this revision.
corona10 added a reviewer: sivachandra.
corona10 added a project: libc-project.
Herald added subscribers: libc-commits, ecnelises, tschuett.
Herald added a project: All.
corona10 requested review of this revision.

Fix seek_func to use SYS__llseek if possible


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D133022

Files:
  libc/src/__support/File/linux_file.cpp


Index: libc/src/__support/File/linux_file.cpp
===================================================================
--- libc/src/__support/File/linux_file.cpp
+++ libc/src/__support/File/linux_file.cpp
@@ -77,7 +77,7 @@
   long ret = __llvm_libc::syscall(SYS_lseek, lf->get_fd(), offset, whence);
 #elif defined(SYS__llseek)
   long result;
-  long ret = __llvm_libc::syscall(SYS__lseek, lf->get_fd(), offset >> 32,
+  long ret = __llvm_libc::syscall(SYS__llseek, lf->get_fd(), offset >> 32,
                                   offset, &result, whence);
 #else
 #error "lseek and _llseek syscalls not available to perform a seek operation."


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D133022.456956.patch
Type: text/x-patch
Size: 638 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libc-commits/attachments/20220831/a264133f/attachment.bin>


More information about the libc-commits mailing list