diff options
Diffstat (limited to 'sysdeps/unix/sysv/linux/open64.c')
-rw-r--r-- | sysdeps/unix/sysv/linux/open64.c | 25 |
1 files changed, 20 insertions, 5 deletions
diff --git a/sysdeps/unix/sysv/linux/open64.c b/sysdeps/unix/sysv/linux/open64.c index 5fb5363e1e..a38a31b7a0 100644 --- a/sysdeps/unix/sysv/linux/open64.c +++ b/sysdeps/unix/sysv/linux/open64.c @@ -1,4 +1,5 @@ -/* Copyright (C) 1991,1995-1997,1999,2000,2002 Free Software Foundation, Inc. +/* Copyright (C) 1991,1995-1997,1999,2000,2002,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 @@ -19,7 +20,7 @@ #include <errno.h> #include <fcntl.h> #include <stdarg.h> -#include <bp-sym.h> +#include <stdio.h> #include <sysdep-cancel.h> /* Open FILE with access OFLAG. If OFLAG includes O_CREAT, @@ -48,6 +49,20 @@ __libc_open64 (const char *file, int oflag, ...) return result; } -weak_alias (__libc_open64, BP_SYM (__open64)) -libc_hidden_weak (BP_SYM (__open64)) -weak_alias (__libc_open64, BP_SYM (open64)) +weak_alias (__libc_open64, __open64) +libc_hidden_weak (__open64) +weak_alias (__libc_open64, open64) + + +#ifndef PTW +int +__open64_2 (file, oflag) + const char *file; + int oflag; +{ + if (oflag & O_CREAT) + __fortify_fail ("invalid open64 call: O_CREAT without mode"); + + return __open64 (file, oflag); +} +#endif |