diff options
author | Jeff Johnston <jjohnstn@redhat.com> | 2003-06-27 00:00:48 +0000 |
---|---|---|
committer | Jeff Johnston <jjohnstn@redhat.com> | 2003-06-27 00:00:48 +0000 |
commit | 51fa7562e2af0aa43078f3b4ec21ce660efd6338 (patch) | |
tree | 6d3ba6b3458b892f49bc01a267a71cfc24cc56a8 /newlib/libc/sys/linux/mq_open.c | |
parent | 5283b6437dfb234816e4863aae60e9361d248cb5 (diff) | |
download | cygnal-51fa7562e2af0aa43078f3b4ec21ce660efd6338.tar.gz cygnal-51fa7562e2af0aa43078f3b4ec21ce660efd6338.tar.bz2 cygnal-51fa7562e2af0aa43078f3b4ec21ce660efd6338.zip |
2003-06-26 Jeff Johnston <jjohnstn@redhat.com>
* libc/sys/linux/mq_open.c (mq_open): Must allocate rdbuf and
wrbuf for a non-creating open.
Diffstat (limited to 'newlib/libc/sys/linux/mq_open.c')
-rw-r--r-- | newlib/libc/sys/linux/mq_open.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/newlib/libc/sys/linux/mq_open.c b/newlib/libc/sys/linux/mq_open.c index 744cb9eaa..0e6b95345 100644 --- a/newlib/libc/sys/linux/mq_open.c +++ b/newlib/libc/sys/linux/mq_open.c @@ -210,7 +210,11 @@ mq_open (const char *name, int oflag, ...) } } else /* just open it */ - msgqid = msgget (key, 0); + { + msgqid = msgget (key, 0); + wrbuf = (MSG *)malloc (attr->mq_msgsize + sizeof(int)); + rdbuf = (MSG *)malloc (attr->mq_msgsize + sizeof(int)); + } /* release semaphore acquired earlier */ sb.sem_op = 1; |