version: fix the IDN feature for winidn and appleidn

Closes #16091
This commit is contained in:
Daniel Stenberg 2025-01-26 14:14:44 +01:00
parent e27abfe2f1
commit 2a49cad39e
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2

View File

@ -416,10 +416,15 @@ static const char * const supported_protocols[] = {
* curl_global_init() and curl_global_cleanup() calls.
*/
#if defined(USE_LIBIDN2)
#if defined(USE_LIBIDN2) || defined(USE_WIN32_IDN) || defined(USE_APPLE_IDN)
static int idn_present(curl_version_info_data *info)
{
#if defined(USE_WIN32_IDN) || defined(USE_APPLE_IDN)
(void)info;
return TRUE;
#else
return info->libidn != NULL;
#endif
}
#else
#define idn_present NULL