Re: [PATCH v16 00/14] Reftable support git-core
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jun 10, 2020, 17:09 UTC
- Message-ID
- <xmqqimfyg84j.fsf@gitster.c.googlers.com>
- In-Reply-To
- <CAOw_e7ZzEyb+21QHcNGcj5A8N501-a5fF3HNL0Jq6uD8S37G6A@mail.gmail.com>
Han-Wen Nienhuys <hanwenn@gmail.com> writes:
Show 10 quoted lines
> 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?