git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] portability: allow building in systems without d_type

From
Marc Branchaud <marcnarc@xiplink.com>
Date
Jun 18, 2025, 14:12 UTC
Message-ID
<e6fc37e6-7259-4561-888f-c3e892694421@xiplink.com>
In-Reply-To
<20250618062331.78059-1-carenas@gmail.com>
On 2025-06-18 02:23, Carlo Marcelo Arenas Belón wrote:
> Since 09fb155f11 (diff --no-index: support limiting by pathspec,
> 2025-05-21) will fail to build in platforms that don't have a
s/will fail/git fails/
> d_type member on their struct dirent (ex: AIX, NonStop).
> 
> Use the DTYPE() macro instead of a nake reference to d_type.
s/nake/naked/
		M.
Show 18 quoted lines
> Signed-off-by: Carlo Marcelo Arenas Belón <carenas@gmail.com>
> ---
>   diff-no-index.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/diff-no-index.c b/diff-no-index.c
> index 4aeeb98cfa..7c95222ba6 100644
> --- a/diff-no-index.c
> +++ b/diff-no-index.c
> @@ -46,7 +46,7 @@ static int read_directory_contents(const char *path, struct string_list *list,
>   
>   			if (!match_leading_pathspec(NULL, pathspec,
>   						    match.buf, match.len,
> -						    0, NULL, e->d_type == DT_DIR ? 1 : 0))
> +						    0, NULL, DTYPE(e) == DT_DIR ? 1 : 0))
>   				continue;
>   		}
>   
Previous: Collin FunkNext: Kristoffer Haugsbakk
Message 3 of 6 in “portability: allow building in systems without d_type”
  1. portability: allow building in systems without d_typeCarlo Marcelo Arenas Belón, Jun 18, 2025
  2. Collin FunkJun 18, 2025
  3. Marc BranchaudJun 18, 2025
  4. Kristoffer HaugsbakkJun 18, 2025
  5. Junio C HamanoJun 18, 2025
  6. Collin FunkJun 18, 2025

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.