https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=b6fbe0fc2e062e6f0d155009da235574e39dbbe2

commit b6fbe0fc2e062e6f0d155009da235574e39dbbe2
Author:     Corinna Vinschen <[email protected]>
AuthorDate: Wed Aug 9 16:56:40 2023 +0200
Commit:     Corinna Vinschen <[email protected]>
CommitDate: Wed Aug 9 16:56:40 2023 +0200

    Cygwin: lseek: propagate new SEEK_DATA and SEEK_HOLE to fhandler
    
    Signed-off-by: Corinna Vinschen <[email protected]>

Diff:
---
 winsup/cygwin/syscalls.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/winsup/cygwin/syscalls.cc b/winsup/cygwin/syscalls.cc
index 04907b991c48..e4b3dd2f3c62 100644
--- a/winsup/cygwin/syscalls.cc
+++ b/winsup/cygwin/syscalls.cc
@@ -1559,7 +1559,7 @@ lseek (int fd, off_t pos, int dir)
 {
   off_t res;
 
-  if (dir != SEEK_SET && dir != SEEK_CUR && dir != SEEK_END)
+  if (dir < SEEK_SET || dir > SEEK_HOLE)
     {
       set_errno (EINVAL);
       res = -1;

Reply via email to