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

Siva Chandra via Phabricator via libc-commits libc-commits at lists.llvm.org
Wed Aug 31 10:58:50 PDT 2022


This revision was automatically updated to reflect the committed changes.
Closed by commit rGe75cce76ab86: [libc] Fix typo in lseek syscall number macro. (authored by corona10, committed by sivachandra).

Changed prior to commit:
  https://reviews.llvm.org/D133022?vs=456956&id=457024#toc

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D133022/new/

https://reviews.llvm.org/D133022

Files:
  libc/src/__support/File/linux_file.cpp
  libc/src/unistd/linux/lseek.cpp


Index: libc/src/unistd/linux/lseek.cpp
===================================================================
--- libc/src/unistd/linux/lseek.cpp
+++ libc/src/unistd/linux/lseek.cpp
@@ -23,8 +23,8 @@
   long ret = __llvm_libc::syscall(SYS_lseek, fd, offset, whence);
   result = ret;
 #elif defined(SYS__llseek)
-  long ret = __llvm_libc::syscall(SYS__lseek, fd, offset >> 32, offset, &result,
-                                  whence);
+  long ret = __llvm_libc::syscall(SYS__llseek, fd, offset >> 32, offset,
+                                  &result, whence);
 #else
 #error "lseek and _llseek syscalls not available."
 #endif
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.457024.patch
Type: text/x-patch
Size: 1267 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libc-commits/attachments/20220831/198bccf1/attachment.bin>


More information about the libc-commits mailing list