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 | |
parent | 5283b6437dfb234816e4863aae60e9361d248cb5 (diff) | |
download | newlib-51fa7562e2af0aa43078f3b4ec21ce660efd6338.zip newlib-51fa7562e2af0aa43078f3b4ec21ce660efd6338.tar.gz newlib-51fa7562e2af0aa43078f3b4ec21ce660efd6338.tar.bz2 |
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.
-rw-r--r-- | newlib/ChangeLog | 5 | ||||
-rw-r--r-- | newlib/libc/sys/linux/mq_open.c | 6 |
2 files changed, 10 insertions, 1 deletions
diff --git a/newlib/ChangeLog b/newlib/ChangeLog index 82bebfd..e516a78 100644 --- a/newlib/ChangeLog +++ b/newlib/ChangeLog @@ -1,3 +1,8 @@ +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. + 2003-06-24 Kazu Hirata <kazu@cs.umass.edu> * libc/machine/h8300/setarch.h: New. diff --git a/newlib/libc/sys/linux/mq_open.c b/newlib/libc/sys/linux/mq_open.c index 744cb9e..0e6b953 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; |