about summary refs log tree commit diff
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2012-05-10 15:54:27 -0700
committerRoland McGrath <roland@hack.frob.com>2012-05-10 15:57:29 -0700
commit61f06bd3ba0a5c95ca7261cacb13025fa30f10f4 (patch)
tree5a6925d799e057a848b7b6c42a4d409a7b46d969
parent918d4d716343a54ce97aefb13d20fa8f4e1d03de (diff)
downloadglibc-61f06bd3ba0a5c95ca7261cacb13025fa30f10f4.tar.gz
glibc-61f06bd3ba0a5c95ca7261cacb13025fa30f10f4.tar.xz
glibc-61f06bd3ba0a5c95ca7261cacb13025fa30f10f4.zip
Hurd: fix mode type for openat
-rw-r--r--ChangeLog3
-rw-r--r--sysdeps/mach/hurd/openat.c6
2 files changed, 6 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index fa79b77af5..89a6ccfa5a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2012-05-10  Samuel Thibault  <samuel.thibault@ens-lyon.org>
 
+	* sysdeps/mach/hurd/openat.c (__openat): Set type of MODE to mode_t
+	instead of int.
+
 	* sysdeps/mach/hurd/xmknodat.c (__xmknodat): Deallocate NODE port only
 	if __dir_mkfile succeeded.
 
diff --git a/sysdeps/mach/hurd/openat.c b/sysdeps/mach/hurd/openat.c
index 69d257c181..c6fcf49d8b 100644
--- a/sysdeps/mach/hurd/openat.c
+++ b/sysdeps/mach/hurd/openat.c
@@ -1,5 +1,5 @@
 /* openat -- Open a file named relative to an open directory.  Hurd version.
-   Copyright (C) 2006 Free Software Foundation, Inc.
+   Copyright (C) 2006-2012 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
@@ -34,14 +34,14 @@ __openat (fd, file, oflag)
      const char *file;
      int oflag;
 {
-  int mode;
+  mode_t mode;
   io_t port;
 
   if (oflag & O_CREAT)
     {
       va_list arg;
       va_start (arg, oflag);
-      mode = va_arg (arg, int);
+      mode = va_arg (arg, mode_t);
       va_end (arg);
     }
   else