about summary refs log tree commit diff
path: root/sysdeps/generic/openat.c
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/generic/openat.c')
-rw-r--r--sysdeps/generic/openat.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sysdeps/generic/openat.c b/sysdeps/generic/openat.c
index b058bcbe9f..f3f699ca23 100644
--- a/sysdeps/generic/openat.c
+++ b/sysdeps/generic/openat.c
@@ -39,7 +39,7 @@ openat (fd, file, oflag)
       return -1;
     }
 
-  if (file[0] != '/')
+  if (fd != AT_FDCWD && file[0] != '/')
     {
       /* Check FD is associated with a directory.  */
       struct stat64 st;