summaryrefslogtreecommitdiff
path: root/components/pthreads/mqueue.c
diff options
context:
space:
mode:
authorArda <[email protected]>2014-07-20 00:27:39 +0800
committerArda <[email protected]>2014-07-20 00:27:39 +0800
commitd1a4f2e8fedf0b556060973b8bfe13c33006687c (patch)
tree4e8c31a49b8f7d25093ee3c4c7f8ac0c9eea0827 /components/pthreads/mqueue.c
parentf74d7f16c0694b01c190b9b00a1f3e8dab9d662d (diff)
parent0eb35940a400ca2c36a585d30696eac47c6d687a (diff)
Merge pull request #1 from RT-Thread/master
pull rt-thread master
Diffstat (limited to 'components/pthreads/mqueue.c')
-rw-r--r--components/pthreads/mqueue.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/components/pthreads/mqueue.c b/components/pthreads/mqueue.c
index c1303ae6b1..7b669dc367 100644
--- a/components/pthreads/mqueue.c
+++ b/components/pthreads/mqueue.c
@@ -119,6 +119,7 @@ mqd_t mq_open(const char *name, int oflag, ...)
{
mqd_t mqdes;
va_list arg;
+ mode_t mode;
struct mq_attr *attr = RT_NULL;
/* lock posix mqueue list */
@@ -128,6 +129,8 @@ mqd_t mq_open(const char *name, int oflag, ...)
if (oflag & O_CREAT)
{
va_start(arg, oflag);
+ mode = (mode_t)va_arg(arg, unsigned int);
+ mode = mode;
attr = (struct mq_attr *)va_arg(arg, struct mq_attr *);
va_end(arg);