Skip to content

Commit a2409ca

Browse files
committed
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>
1 parent c753820 commit a2409ca

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
@@ -411,7 +411,7 @@ endif()
411411
#function checks
412412
set(function_checks
413413
strcasestr memmem strlcpy strtoimax strtoumax strtoull
414-
setenv mkdtemp poll pread memmem)
414+
setenv mkdtemp poll pread memmem writev)
415415

416416
#unsetenv,hstrerror are incompatible with windows build
417417
if(NOT WIN32)
@@ -456,6 +456,10 @@ if(NOT HAVE_MEMMEM)
456456
list(APPEND compat_SOURCES compat/memmem.c)
457457
endif()
458458

459+
if(NOT HAVE_WRITEV)
460+
list(APPEND compat_SOURCES compat/writev.c)
461+
endif()
462+
459463
if(NOT WIN32)
460464
if(NOT HAVE_UNSETENV)
461465
list(APPEND compat_SOURCES compat/unsetenv.c)

0 commit comments

Comments
 (0)