build: require POSIX strdup()

Stop detecting this function and drop the local fallback.

Let us know if this update is causing an issue.

Notes:
- on Windows `_strdup()` is required instead.
- `strdup()/_strdup()` were required before this patch to build one of
  the examples: `block_ip`.
- `strdup()/_strdup()` were required in 8.18.0 and earlier to build
  tests.

Closes #20505
This commit is contained in:
Viktor Szakats 2026-02-02 19:02:34 +01:00
parent 710d5a28fb
commit 0590753a3c
No known key found for this signature in database
GPG key ID: B5ABD165E2AEF201
10 changed files with 0 additions and 120 deletions

View file

@ -1612,7 +1612,6 @@ if(NOT WIN32)
check_function_exists("realpath" HAVE_REALPATH)
check_function_exists("sched_yield" HAVE_SCHED_YIELD)
check_symbol_exists("strcasecmp" "string.h" HAVE_STRCASECMP)
check_symbol_exists("strdup" "string.h" HAVE_STRDUP)
check_symbol_exists("stricmp" "string.h" HAVE_STRICMP)
check_symbol_exists("strcmpi" "string.h" HAVE_STRCMPI)
endif()