summaryrefslogtreecommitdiff
path: root/rt/mq_open.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2007-09-18 19:57:24 +0000
committerJakub Jelinek <jakub@redhat.com>2007-09-18 19:57:24 +0000
commit7913ba4d91b848ec4e5698c59d43198a3ef9215d (patch)
treeafc73f6e0376ae6d07526c5efa9e941641ce1f6d /rt/mq_open.c
parentcedf9b89dd3b436ff7fad4c75d3f288ee4cd4ecd (diff)
Updated to fedora-glibc-20070918T1931cvs/fedora-glibc-2_6_90-14
Diffstat (limited to 'rt/mq_open.c')
-rw-r--r--rt/mq_open.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/rt/mq_open.c b/rt/mq_open.c
index dea5741d5a..77d872ea20 100644
--- a/rt/mq_open.c
+++ b/rt/mq_open.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2004 Free Software Foundation, Inc.
+/* Copyright (C) 2004, 2007 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -18,6 +18,7 @@
#include <errno.h>
#include <mqueue.h>
+#include <stdio.h>
/* Establish connection between a process and a message queue NAME and
return message queue descriptor or (mqd_t) -1 on error. OFLAG determines
@@ -27,10 +28,21 @@
attributes. If the fourth argument is NULL, default attributes are
used. */
mqd_t
-mq_open (const char *name, int oflag, ...)
+__mq_open (const char *name, int oflag, ...)
{
__set_errno (ENOSYS);
return (mqd_t) -1;
}
+strong_alias (__mq_open, mq_open);
stub_warning (mq_open)
+
+mqd_t
+__mq_open_2 (const char *name, int oflag)
+{
+ if (oflag & O_CREAT)
+ __fortify_fail ("invalid mq_open call: O_CREAT without mode and attr");
+
+ return __mq_open (name, oflag);
+}
+stub_warning (__mq_open_2)
#include <stub-tag.h>