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

Re: [PATCH] cmake: use writev(3p) wrapper as needed

From
Junio C Hamano <gitster@pobox.com>
Date
Apr 3, 2026, 17:35 UTC
Message-ID
<xmqq5x68ne03.fsf@gitster.g>
In-Reply-To
<pull.2078.git.1775206502134.gitgitgadget@gmail.com>

"Johannes Schindelin via GitGitGadget" <gitgitgadget@gmail.com> writes:

Show 13 quoted lines
> From: Johannes Schindelin <johannes.schindelin@gmx.de>
>
> This is a companion patch of 3b9b2c2a29a (compat/posix: introduce
> writev(3p) wrapper, 2026-03-13) where support for using the `writev()`
> wrapper was introduced in the `Makefile` and the Meson-based build, but
> the CMake build still needs that treatment, too.
>
> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
> ---
>     cmake: use writev(3p) wrapper as needed
>     
>     This was necessary to get Git for Windows v2.54.0-rc0's CI builds to
>     pass successfully.
Thanks.

I should have been paying a bit more attention when I saw a patch that touches meson.build files, I think. Sorry about the slippage.

Show 33 quoted lines
> Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-2078%2Fdscho%2Fwritev-vs-cmake-v1
> Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-2078/dscho/writev-vs-cmake-v1
> Pull-Request: https://github.com/gitgitgadget/git/pull/2078
>
>  contrib/buildsystems/CMakeLists.txt | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/contrib/buildsystems/CMakeLists.txt b/contrib/buildsystems/CMakeLists.txt
> index c6cfb874ef..dce9c84d0b 100644
> --- a/contrib/buildsystems/CMakeLists.txt
> +++ b/contrib/buildsystems/CMakeLists.txt
> @@ -376,7 +376,7 @@ endif()
>  #function checks
>  set(function_checks
>  	strcasestr memmem strlcpy strtoimax strtoumax strtoull
> -	setenv mkdtemp poll pread memmem)
> +	setenv mkdtemp poll pread memmem writev)
>  
>  #unsetenv,hstrerror are incompatible with windows build
>  if(NOT WIN32)
> @@ -421,6 +421,10 @@ if(NOT HAVE_MEMMEM)
>  	list(APPEND compat_SOURCES compat/memmem.c)
>  endif()
>  
> +if(NOT HAVE_WRITEV)
> +	list(APPEND compat_SOURCES compat/writev.c)
> +endif()
> +
>  if(NOT WIN32)
>  	if(NOT HAVE_UNSETENV)
>  		list(APPEND compat_SOURCES compat/unsetenv.c)
>
> base-commit: 6e8d538aab8fe4dd07ba9fb87b5c7edcfa5706ad
Previous: Johannes Schindelin via GitGitGadget
Message 2 of 2 in “cmake: use writev(3p) wrapper as needed”
  1. cmake: use writev(3p) wrapper as neededJohannes Schindelin via GitGitGadget, Apr 3, 2026
  2. Junio C HamanoApr 3, 2026

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.