]> git.ipfire.org Git - thirdparty/curl.git/commit
cmake: fix Linux pre-fills for non-glibc (when `_CURL_PREFILL=ON`)
authorViktor Szakats <commit@vsz.me>
Sat, 18 Oct 2025 11:08:53 +0000 (13:08 +0200)
committerViktor Szakats <commit@vsz.me>
Sat, 18 Oct 2025 11:53:30 +0000 (13:53 +0200)
commitf30f1307c1d9d70a96557359f039ba7ef9b077fb
tree47babd6f166f345db599a029525ef2cc5905edeb
parent8de898414c422ed56980dd4ac3a0125bc6fec5c5
cmake: fix Linux pre-fills for non-glibc (when `_CURL_PREFILL=ON`)

- do not pre-fill `HAVE_LINUX_TCP_H` on Linux.
  `linux/tcp.h` is a Linux kernel userspace header. It's likely
  installed when using glibc and likely missing by default when using
  something else, e.g. MUSL (e.g. on Alpine).

  Therefore always detect it for Linux targets, and only pre-fill it for
  non-Linux ones.

- do not pre-fill `HAVE_GLIBC_STRERROR_R` on Linux.
  To fix it for non-glibc envs, e.g. MUSL (e.g. on Alpine).

Note, the pre-fill option is a disabled by default, internal option and
strongly not recommended outside of curl development.

Closes #19116
CMake/unix-cache.cmake