Han-Wen Nienhuys <hanwenn@xxxxxxxxx> writes: > There is also: > > reftable/stack_test.c:27:7: error: incompatible pointer types > initializing 'PREC_DIR *' with an expression of type 'DIR *' > [-Werror,-Wincompatible-pointer-types] > DIR *dir = fdopendir(fd); > > on OSX. What is the proper dialect for reading out a directory within > the git source code? opendir and fdopendir are POSIX, so I'm surprised > this fails. I am reasonably sure we use opendir() to iterate over existing files and subdirectories in a directory (e.g. in the codepaths to enumerate loose object files in .git/objects/??/ directories). I do not offhand know we also use fdopendir() elsewhere. I strongly suspect we do not. Perhaps some platforms do POSIX.1-2001 but not ready for POSIX.1-2008 or something silly like that?