bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

closedir: avoid warning


From: Bruno Haible
Subject: closedir: avoid warning
Date: Fri, 4 Nov 2011 12:03:37 +0100
User-agent: KMail/1.13.6 (Linux/2.6.37.6-0.5-desktop; KDE/4.6.0; x86_64; ; )

On mingw, I'm seeing this gcc warning:

closedir.c: In function `rpl_closedir':
closedir.c:60: warning: implicit declaration of function `_gl_unregister_fd'

This fixes it.


2011-11-04  Bruno Haible  <address@hidden>

        closedir: Avoid warning on mingw.
        * lib/closedir.c: Include <unistd.h>.

*** lib/closedir.c.orig Fri Nov  4 12:02:36 2011
--- lib/closedir.c      Fri Nov  4 12:00:25 2011
***************
*** 19,24 ****
--- 19,28 ----
  /* Specification.  */
  #include <dirent.h>
  
+ #if REPLACE_FCHDIR
+ # include <unistd.h>
+ #endif
+ 
  #if HAVE_CLOSEDIR
  
  /* Override closedir(), to keep track of the open file descriptors.

-- 
In memoriam Yitzhak Rabin <http://en.wikipedia.org/wiki/Yitzhak_Rabin>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]