cmake: use writev(3p) wrapper as needed
PATCH 1/1 cmake: use writev(3p) wrapper as needed
From: Johannes Schindelin <[email protected]>
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.
---
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.
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(-)
contrib/buildsystems/CMakeLists.txt +5 -1
@@ -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
Signature · 1 line
gitgitgadget
"Johannes Schindelin via GitGitGadget" <[email protected]>
Quoted 7 lines · writes:
From: Johannes Schindelin <[email protected]>
This is a companion patch of
3b9b2c2a29a(compat/posix: introduce writev(3p) wrapper, 2026-03-13) where support for using thewritev()wrapper was introduced in theMakefileand the Meson-based build, but the CMake build still needs that treatment, too.
Quoted 6 lines
Signed-off-by Johannes Schindelin <[email protected]>---
cmake: use writev(3p) wrapper as neededThis 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.
Quoted 33 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/2078contrib/buildsystems/CMakeLists.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)contrib/buildsystems/CMakeLists.txt +5
-1@@ -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