Skip to content

Commit 89152af

Browse files
dschogitster
authored andcommitted
cmake: use writev(3p) wrapper as needed
This is a companion patch of 3b9b2c2 (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> Signed-off-by: Junio C Hamano <gitster@pobox.com>
1 parent 835e0aa commit 89152af

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

contrib/buildsystems/CMakeLists.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -374,7 +374,7 @@ endif()
374374
#function checks
375375
set(function_checks
376376
strcasestr memmem strlcpy strtoimax strtoumax strtoull
377-
setenv mkdtemp poll pread memmem)
377+
setenv mkdtemp poll pread memmem writev)
378378

379379
#unsetenv,hstrerror are incompatible with windows build
380380
if(NOT WIN32)
@@ -419,6 +419,10 @@ if(NOT HAVE_MEMMEM)
419419
list(APPEND compat_SOURCES compat/memmem.c)
420420
endif()
421421

422+
if(NOT HAVE_WRITEV)
423+
list(APPEND compat_SOURCES compat/writev.c)
424+
endif()
425+
422426
if(NOT WIN32)
423427
if(NOT HAVE_UNSETENV)
424428
list(APPEND compat_SOURCES compat/unsetenv.c)

0 commit comments

Comments
 (0)