summaryrefslogtreecommitdiff
path: root/libc/sysdeps/unix/sysv/linux/mq_open.c
diff options
context:
space:
mode:
authorjoseph <joseph@7b3dc134-2b1b-0410-93df-9e9f96275f8d>2007-09-25 15:22:16 +0000
committerjoseph <joseph@7b3dc134-2b1b-0410-93df-9e9f96275f8d>2007-09-25 15:22:16 +0000
commit39214d562d474c17d8242008f5454e9c9ca710ad (patch)
tree1c44f1babbdb5d368fc0e1032b4e9d013af2263a /libc/sysdeps/unix/sysv/linux/mq_open.c
parent9238710d492f92f0221bba03ee01c08ccbd6387c (diff)
downloadeglibc2-39214d562d474c17d8242008f5454e9c9ca710ad.tar.gz
Merge changes between r3467 and r3614 from /fsf/trunk.
git-svn-id: svn://svn.eglibc.org/trunk@3615 7b3dc134-2b1b-0410-93df-9e9f96275f8d
Diffstat (limited to 'libc/sysdeps/unix/sysv/linux/mq_open.c')
-rw-r--r--libc/sysdeps/unix/sysv/linux/mq_open.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/libc/sysdeps/unix/sysv/linux/mq_open.c b/libc/sysdeps/unix/sysv/linux/mq_open.c
index eac6e0123..6330fee4e 100644
--- a/libc/sysdeps/unix/sysv/linux/mq_open.c
+++ b/libc/sysdeps/unix/sysv/linux/mq_open.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2004, 2005 Free Software Foundation, Inc.
+/* Copyright (C) 2004, 2005, 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
@@ -20,6 +20,7 @@
#include <mqueue.h>
#include <stdarg.h>
#include <stddef.h>
+#include <stdio.h>
#include <sysdep.h>
#ifdef __NR_mq_open
@@ -32,7 +33,7 @@
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, ...)
{
if (name[0] != '/')
{
@@ -54,7 +55,16 @@ mq_open (const char *name, int oflag, ...)
return INLINE_SYSCALL (mq_open, 4, name + 1, oflag, mode, attr);
}
+strong_alias (__mq_open, 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);
+}
#else
# include <rt/mq_open.c>
#endif