{"thread":{"id":"65427","subject":"[PATCH] cmake: use writev(3p) wrapper as needed","startedAt":"2026-04-03T08:55:06Z","lastAt":"2026-04-03T17:35:28Z","messageCount":2,"participants":["Johannes Schindelin via GitGitGadget","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"540844","messageId":"pull.2078.git.1775206502134.gitgitgadget@gmail.com","threadId":"65427","inReplyTo":null,"subject":"[PATCH] cmake: use writev(3p) wrapper as needed","fromName":"Johannes Schindelin via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2026-04-03T08:55:02Z","receivedAt":"2026-04-03T08:55:06Z","isPatch":true,"body":"From: Johannes Schindelin <johannes.schindelin@gmx.de>\n\nThis is a companion patch of 3b9b2c2a29a (compat/posix: introduce\nwritev(3p) wrapper, 2026-03-13) where support for using the `writev()`\nwrapper was introduced in the `Makefile` and the Meson-based build, but\nthe CMake build still needs that treatment, too.\n\nSigned-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n---\n    cmake: use writev(3p) wrapper as needed\n    \n    This was necessary to get Git for Windows v2.54.0-rc0's CI builds to\n    pass successfully.\n\nPublished-As: https://github.com/gitgitgadget/git/releases/tag/pr-2078%2Fdscho%2Fwritev-vs-cmake-v1\nFetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-2078/dscho/writev-vs-cmake-v1\nPull-Request: https://github.com/gitgitgadget/git/pull/2078\n\n contrib/buildsystems/CMakeLists.txt | 6 +++++-\n 1 file changed, 5 insertions(+), 1 deletion(-)\n\ndiff --git a/contrib/buildsystems/CMakeLists.txt b/contrib/buildsystems/CMakeLists.txt\nindex c6cfb874ef..dce9c84d0b 100644\n--- a/contrib/buildsystems/CMakeLists.txt\n+++ b/contrib/buildsystems/CMakeLists.txt\n@@ -376,7 +376,7 @@ endif()\n #function checks\n set(function_checks\n \tstrcasestr memmem strlcpy strtoimax strtoumax strtoull\n-\tsetenv mkdtemp poll pread memmem)\n+\tsetenv mkdtemp poll pread memmem writev)\n \n #unsetenv,hstrerror are incompatible with windows build\n if(NOT WIN32)\n@@ -421,6 +421,10 @@ if(NOT HAVE_MEMMEM)\n \tlist(APPEND compat_SOURCES compat/memmem.c)\n endif()\n \n+if(NOT HAVE_WRITEV)\n+\tlist(APPEND compat_SOURCES compat/writev.c)\n+endif()\n+\n if(NOT WIN32)\n \tif(NOT HAVE_UNSETENV)\n \t\tlist(APPEND compat_SOURCES compat/unsetenv.c)\n\nbase-commit: 6e8d538aab8fe4dd07ba9fb87b5c7edcfa5706ad\n-- \ngitgitgadget\n"},{"id":"540858","messageId":"xmqq5x68ne03.fsf@gitster.g","threadId":"65427","inReplyTo":"pull.2078.git.1775206502134.gitgitgadget@gmail.com","subject":"Re: [PATCH] cmake: use writev(3p) wrapper as needed","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2026-04-03T17:35:24Z","receivedAt":"2026-04-03T17:35:28Z","isPatch":true,"body":"\"Johannes Schindelin via GitGitGadget\" <gitgitgadget@gmail.com>\nwrites:\n\n> From: Johannes Schindelin <johannes.schindelin@gmx.de>\n>\n> This is a companion patch of 3b9b2c2a29a (compat/posix: introduce\n> writev(3p) wrapper, 2026-03-13) where support for using the `writev()`\n> wrapper was introduced in the `Makefile` and the Meson-based build, but\n> the CMake build still needs that treatment, too.\n>\n> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>\n> ---\n>     cmake: use writev(3p) wrapper as needed\n>     \n>     This was necessary to get Git for Windows v2.54.0-rc0's CI builds to\n>     pass successfully.\n\nThanks.\n\nI should have been paying a bit more attention when I saw a patch\nthat touches meson.build files, I think.  Sorry about the slippage.\n\n> Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-2078%2Fdscho%2Fwritev-vs-cmake-v1\n> Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-2078/dscho/writev-vs-cmake-v1\n> Pull-Request: https://github.com/gitgitgadget/git/pull/2078\n>\n>  contrib/buildsystems/CMakeLists.txt | 6 +++++-\n>  1 file changed, 5 insertions(+), 1 deletion(-)\n>\n> diff --git a/contrib/buildsystems/CMakeLists.txt b/contrib/buildsystems/CMakeLists.txt\n> index c6cfb874ef..dce9c84d0b 100644\n> --- a/contrib/buildsystems/CMakeLists.txt\n> +++ b/contrib/buildsystems/CMakeLists.txt\n> @@ -376,7 +376,7 @@ endif()\n>  #function checks\n>  set(function_checks\n>  \tstrcasestr memmem strlcpy strtoimax strtoumax strtoull\n> -\tsetenv mkdtemp poll pread memmem)\n> +\tsetenv mkdtemp poll pread memmem writev)\n>  \n>  #unsetenv,hstrerror are incompatible with windows build\n>  if(NOT WIN32)\n> @@ -421,6 +421,10 @@ if(NOT HAVE_MEMMEM)\n>  \tlist(APPEND compat_SOURCES compat/memmem.c)\n>  endif()\n>  \n> +if(NOT HAVE_WRITEV)\n> +\tlist(APPEND compat_SOURCES compat/writev.c)\n> +endif()\n> +\n>  if(NOT WIN32)\n>  \tif(NOT HAVE_UNSETENV)\n>  \t\tlist(APPEND compat_SOURCES compat/unsetenv.c)\n>\n> base-commit: 6e8d538aab8fe4dd07ba9fb87b5c7edcfa5706ad\n"}]}