# HG changeset patch # User Eric Blake # Date 1316009975 21600 # Node ID 9fd376c9460f6c9108805a04fb61c623da8e5e9d # Parent 79e8ec9a79db8ae99d8b9eca1fac8e64179bf0ab 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 diff --git a/ChangeLog b/ChangeLog --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2011-09-14 Eric Blake + + opendir: avoid compile warning + * lib/opendir.c (includes): Always include errno.h. + Reported by Tatsuro MATSUOKA. + 2011-09-14 Jim Meyering maint.mk: sc_tight_scope: propagate failure from sub-make diff --git a/lib/opendir.c b/lib/opendir.c --- a/lib/opendir.c +++ b/lib/opendir.c @@ -19,6 +19,8 @@ /* Specification. */ #include +#include + #if HAVE_OPENDIR /* Override opendir(), to keep track of the open file descriptors. @@ -26,7 +28,6 @@ #else -# include # include # include