Problem reported by Benno Schulenberg in:
https://lists.gnu.org/r/bug-gnulib/2022-04/msg00052.html
* doc/posix-functions/dirfd.texi: Document NetBSD 9.2 portability
bugs. Remove an old common about errno that is no longer true
of POSIX 2018.
* lib/glob.c (glob_in_dir): Convert dirfd arg from void *
to DIR * before passing it to dirfd.
+2022-04-26 Paul Eggert <eggert@cs.ucla.edu>
+
+ glob: port to NetBSD 9.2
+ Problem reported by Benno Schulenberg in:
+ https://lists.gnu.org/r/bug-gnulib/2022-04/msg00052.html
+ * doc/posix-functions/dirfd.texi: Document NetBSD 9.2 portability
+ bugs. Remove an old common about errno that is no longer true
+ of POSIX 2018.
+ * lib/glob.c (glob_in_dir): Convert dirfd arg from void *
+ to DIR * before passing it to dirfd.
+
2022-04-21 Paul Eggert <eggert@cs.ucla.edu>
regex: match [...---...] like V7 grep
@item
This function always fails on some platforms:
mingw.
-@end itemize
-With the @code{dirfd} module, this functions always sets @code{errno} when it
-fails. (POSIX does not require that @code{dirfd} sets @code{errno} when it
-fails.)
+@item
+There is a @code{dirfd} macro but no function, and the macro does not
+work with an argument of type @code{void *}, as a function would:
+NetBSD 9.2.
+@end itemize
}
else
{
- int dfd = dirfd (stream);
+ DIR *dirp = stream;
+ int dfd = dirfd (dirp);
int fnm_flags = ((!(flags & GLOB_PERIOD) ? FNM_PERIOD : 0)
| ((flags & GLOB_NOESCAPE) ? FNM_NOESCAPE : 0));
flags |= GLOB_MAGCHAR;