diff --git a/winsup/cygwin/fhandler.h b/winsup/cygwin/fhandler.h index 4c475184e..a24c95b1b 100644 --- a/winsup/cygwin/fhandler.h +++ b/winsup/cygwin/fhandler.h @@ -3151,11 +3151,23 @@ public: void fixup_after_fork (HANDLE); - int mkdir (mode_t); +#define NO_IMPL { set_errno (EPERM); return -1; } + + ssize_t __reg3 fgetxattr (const char *, void *, size_t) NO_IMPL; + int __reg3 fsetxattr (const char *, const void *, size_t, int) NO_IMPL; + int __reg3 fadvise (off_t, off_t, int) NO_IMPL; + int __reg3 ftruncate (off_t, bool) NO_IMPL; + int link (const char *) NO_IMPL; + int mkdir (mode_t) NO_IMPL; + ssize_t __reg3 pread (void *, size_t, off_t, void *aio = NULL) NO_IMPL; + ssize_t __reg3 pwrite (void *, size_t, off_t, void *aio = NULL) NO_IMPL; + int lock (int, struct flock *) NO_IMPL; + int mand_lock (int, struct flock *) NO_IMPL; void __reg3 read (void *, size_t&); off_t lseek (off_t, int); int __reg2 fstat (struct stat *); int dup (fhandler_base *, int); + int fcntl (int cmd, intptr_t); int ioctl (unsigned int, void *); int close (); diff --git a/winsup/cygwin/fhandler_mqueue.cc b/winsup/cygwin/fhandler_mqueue.cc index 6215d7b62..745c80643 100644 --- a/winsup/cygwin/fhandler_mqueue.cc +++ b/winsup/cygwin/fhandler_mqueue.cc @@ -376,10 +376,25 @@ fhandler_mqueue::get_proc_fd_name (char *buf) } int -fhandler_mqueue::mkdir (mode_t mode) +fhandler_mqueue::fcntl (int cmd, intptr_t arg) { - set_errno (EPERM); - return -1; + int res; + + switch (cmd) + { + case F_GETFD: + res = close_on_exec () ? FD_CLOEXEC : 0; + break; + case F_GETFL: + res = get_flags (); + debug_printf ("GETFL: %y", res); + break; + default: + set_errno (EINVAL); + res = -1; + break; + } + return res; } /* Do what fhandler_virtual does for read/lseek */