]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Fix fileops.c build for old kernels
authorH.J. Lu <hongjiu.lu@intel.com>
Tue, 17 May 2011 05:45:49 +0000 (01:45 -0400)
committerUlrich Drepper <drepper@gmail.com>
Tue, 17 May 2011 05:45:49 +0000 (01:45 -0400)
ChangeLog
libio/fileops.c

index be25cba7f4a480c089c197134ebe01119bcceabf..c427a2f96af887fdb973dd2ce8ea1ced1d88d47a 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2011-05-16  H.J. Lu  <hongjiu.lu@intel.com>
+
+       * fileops.c (_IO_new_file_fopen): Get fd from _IO_fileno.
+
 2011-05-17  Ulrich Drepper  <drepper@gmail.com>
 
        [BZ #11837]
index 2b696ab1e05d19bf5393429f9e3e66528b4f7db2..30de460391ecbed30a281c9c5022a4b5299fcc9a 100644 (file)
@@ -348,6 +348,7 @@ _IO_new_file_fopen (fp, filename, mode, is32not64)
 #ifndef __ASSUME_O_CLOEXEC
   if ((fp->_flags2 & _IO_FLAGS2_CLOEXEC) != 0 && __have_o_cloexec <= 0)
     {
+      int fd = _IO_fileno (fp);
       if (__have_o_cloexec == 0)
        {
          int flags = __fcntl (fd, F_GETFD);