Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Johnston <jjohnstn@redhat.com>2003-06-27 04:00:48 +0400
committerJeff Johnston <jjohnstn@redhat.com>2003-06-27 04:00:48 +0400
commit51fa7562e2af0aa43078f3b4ec21ce660efd6338 (patch)
tree6d3ba6b3458b892f49bc01a267a71cfc24cc56a8 /newlib/libc/sys/linux/mq_open.c
parent5283b6437dfb234816e4863aae60e9361d248cb5 (diff)
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.c6
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;