diff --git a/winsup/cygwin/fhandler.h b/winsup/cygwin/fhandler.h index 38533974c..b0618963d 100644 --- a/winsup/cygwin/fhandler.h +++ b/winsup/cygwin/fhandler.h @@ -3116,7 +3116,7 @@ public: char *get_proc_fd_name (char *); - struct mq_info *mqinfo (const char *, int8_t *, HANDLE, size_t, mode_t, int); + struct mq_info *mqinfo (int8_t *, HANDLE, size_t, mode_t, int); struct mq_info *mqinfo () { return &mqi; } void fixup_after_fork (HANDLE); diff --git a/winsup/cygwin/fhandler_mqueue.cc b/winsup/cygwin/fhandler_mqueue.cc index dc10a3671..d068d2ad5 100644 --- a/winsup/cygwin/fhandler_mqueue.cc +++ b/winsup/cygwin/fhandler_mqueue.cc @@ -20,22 +20,21 @@ fhandler_mqueue::fhandler_mqueue () : } struct mq_info * -fhandler_mqueue::mqinfo (const char *name, int8_t *mptr, HANDLE sect, - size_t size, mode_t mode, int flags) +fhandler_mqueue::mqinfo (int8_t *mptr, HANDLE sect, size_t size, mode_t mode, + int flags) { WCHAR buf[MAX_PATH]; UNICODE_STRING uname; OBJECT_ATTRIBUTES attr; NTSTATUS status; - set_name (name); mqinfo ()->mqi_hdr = (struct mq_hdr *) mptr; mqinfo ()->mqi_sect = sect; mqinfo ()->mqi_sectsize = size; mqinfo ()->mqi_mode = mode; mqinfo ()->mqi_flags = flags; - __small_swprintf (buf, L"mqueue/mtx%s", name); + __small_swprintf (buf, L"mqueue/mtx%s", get_name ()); RtlInitUnicodeString (&uname, buf); InitializeObjectAttributes (&attr, &uname, OBJ_OPENIF | OBJ_CASE_INSENSITIVE, get_shared_parent_dir (), diff --git a/winsup/cygwin/posix_ipc.cc b/winsup/cygwin/posix_ipc.cc index 056fa966a..f82f146bd 100644 --- a/winsup/cygwin/posix_ipc.cc +++ b/winsup/cygwin/posix_ipc.cc @@ -413,12 +413,12 @@ mq_open (const char *name, int oflag, ...) if (fdm < 0) __leave; - fh = (fhandler_mqueue *) build_fh_dev (*mqueue_dev); + fh = (fhandler_mqueue *) build_fh_dev (*mqueue_dev, name); if (!fh) __leave; fdm = fh; - mqinfo = fh->mqinfo (name, mptr, secth, filesize, mode, nonblock); + mqinfo = fh->mqinfo (mptr, secth, filesize, mode, nonblock); if (!mqinfo) __leave; @@ -506,12 +506,12 @@ mq_open (const char *name, int oflag, ...) if (fdm < 0) __leave; - fh = (fhandler_mqueue *) build_fh_dev (*mqueue_dev); + fh = (fhandler_mqueue *) build_fh_dev (*mqueue_dev, name); if (!fh) __leave; fdm = fh; - mqinfo = fh->mqinfo (name, mptr, secth, filesize, statbuff.st_mode, + mqinfo = fh->mqinfo (mptr, secth, filesize, statbuff.st_mode, nonblock); if (!mqinfo) __leave;