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

commit fb0a539efa0278fd18915fc072bc30b4851a9b75
Author: Jeremy Drake <cyg...@jdrake.com>
Date:   Mon Aug 18 12:48:18 2025 -0700

    Cygwin: fix fcntl F_GETLK
    
    The commit implementing OFD locks dropped the F_GETLK case from the
    switch in fhandler_base::lock, replacing it with F_OFD_GETLK.  This
    appears to have been an oversight, as F_OFD_SETLK was added as an
    additional case above.
    
    This resulted in the winsup.api/ltp/fcntl05 test failing.
    
    Fixes: a66ed519884d ("Cygwin: fcntl: implement Open File Description (OFD) 
locks")
    Signed-off-by: Jeremy Drake <cyg...@jdrake.com>

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

diff --git a/winsup/cygwin/flock.cc b/winsup/cygwin/flock.cc
index 85800e971..e9f49a890 100644
--- a/winsup/cygwin/flock.cc
+++ b/winsup/cygwin/flock.cc
@@ -1162,6 +1162,7 @@ restart:  /* Entry point after a restartable signal came 
in. */
       clean = lock;
       break;
 
+    case F_GETLK:
     case F_OFD_GETLK:
       error = lf_getlock (lock, node, fl);
       lock->lf_next = clean;

Reply via email to