about summary refs log tree commit diff
path: root/io/openat.c
diff options
context:
space:
mode:
Diffstat (limited to 'io/openat.c')
-rw-r--r--io/openat.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/io/openat.c b/io/openat.c
index 2d822702af..18fe750c31 100644
--- a/io/openat.c
+++ b/io/openat.c
@@ -22,6 +22,7 @@
 #include <stdio.h>
 #include <sys/stat.h>
 #include <kernel-features.h>
+#include <libc-internal.h>
 
 /* Some mostly-generic code (e.g. sysdeps/posix/getcwd.c) uses this variable
    if __ASSUME_ATFCTS is not defined.  */
@@ -33,10 +34,7 @@ int __have_atfcts;
    the directory associated with FD.  If OFLAG includes O_CREAT, a
    third argument is the file protection.  */
 int
-__openat (fd, file, oflag)
-     int fd;
-     const char *file;
-     int oflag;
+__openat (int fd, const char *file, int oflag, ...)
 {
   int mode;
 
@@ -66,6 +64,8 @@ __openat (fd, file, oflag)
       va_start (arg, oflag);
       mode = va_arg (arg, int);
       va_end (arg);
+
+      ignore_value (mode);
     }
 
   __set_errno (ENOSYS);