bug-gnulib
[Top][All Lists]
Advanced

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

Re: opendir.c: In function 'rpl_opendir': error: 'errno' undeclared (fir


From: Tatsuro MATSUOKA
Subject: Re: opendir.c: In function 'rpl_opendir': error: 'errno' undeclared (first use in this function)
Date: Thu, 15 Sep 2011 08:34:20 +0900 (JST)

Hello

With this fix I was successfully able to compile opendir.c.
Thanks!

Tatsuro


--- Eric Blake wrote:

> On 09/13/2011 09:42 PM, Tatsuro MATSUOKA wrote:
> > Hello
> > 
> > I am one of the build tester of GNU octave. The GNU octave uses the
> gnulib.
> > After I have pulled the git components, I have met compile error of
> > opendir.c in gnulib components.
> > 
> 
> > ../../../hg/octave-work/libgnu/opendir.c: In function
> 'rpl_opendir':
> > ../../../hg/octave-work/libgnu/opendir.c:136:27: error: 'errno'
> undeclared
> > (first use in this function)
> 
> Thanks for the report.  I'm pushing this to fix it:
> 
> From 6c9a77897ffc9323910cfdb25bf32dae44adbb53 Mon Sep 17 00:00:00
> 2001
> From: Eric Blake <address@hidden>
> Date: Wed, 14 Sep 2011 08:19:35 -0600
> Subject: [PATCH] opendir: avoid compile warning
> 
> If HAVE_OPENDIR but also REPLACE_FCHDIR, then errno was used without
> including the proper header.
> 
> * lib/opendir.c (includes): Always include errno.h.
> Reported by Tatsuro MATSUOKA.
> 
> Signed-off-by: Eric Blake <address@hidden>
> ---
>  ChangeLog     |    6 ++++++
>  lib/opendir.c |    3 ++-
>  2 files changed, 8 insertions(+), 1 deletions(-)
> 
> diff --git a/ChangeLog b/ChangeLog
> index bab5ba2..52fe92d 100644
> --- a/ChangeLog
> +++ b/ChangeLog
> @@ -1,3 +1,9 @@
> +2011-09-14  Eric Blake  <address@hidden>
> +
> +     opendir: avoid compile warning
> +     * lib/opendir.c (includes): Always include errno.h.
> +     Reported by Tatsuro MATSUOKA.
> +
>  2011-09-14  Jim Meyering  <address@hidden>
> 
>       maint.mk: sc_tight_scope: propagate failure from sub-make
> diff --git a/lib/opendir.c b/lib/opendir.c
> index cb7f67c..06c611f 100644
> --- a/lib/opendir.c
> +++ b/lib/opendir.c
> @@ -19,6 +19,8 @@
>  /* Specification.  */
>  #include <dirent.h>
> 
> +#include <errno.h>
> +
>  #if HAVE_OPENDIR
> 
>  /* Override opendir(), to keep track of the open file descriptors.
> @@ -26,7 +28,6 @@
> 
>  #else
> 
> -# include <errno.h>
>  # include <stddef.h>
>  # include <stdlib.h>
> 
> -- 
> 1.7.4.4
> 
> -- 
> Eric Blake   address@hidden    +1-801-349-2682
> Libvirt virtualization library http://libvirt.org
> 




reply via email to

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