fix(mbedtls): suppress -Wunguarded-availability for bundled build

mbedtls 3.6 uses clock_gettime(CLOCK_MONOTONIC) in platform_util.c
which requires iOS 10.0+.  When VLC contribs build with
-Werror=partial-availability and a deployment target of iOS 9.0,
this becomes a hard error.

The runtime fallback already handles the case correctly:
clock_gettime returns -1 on older iOS and mbedtls_ms_time() falls
back to time(NULL) * 1000.

Suppress -Wunguarded-availability for the bundled mbedcrypto static
library only, consistent with the six other warning suppressions
already applied to the bundled build.
This commit is contained in:
Sergio Ammirata
2026-05-30 19:11:35 -04:00
parent 943790307b
commit f09bac21b7
+1
View File
@@ -113,6 +113,7 @@ if builtin_mbedtls and not mbedcrypto_lib_found
'-Wno-incompatible-pointer-types',
'-Wno-shadow', '-Wno-unused-parameter',
'-Wno-pedantic',
'-Wno-unguarded-availability',
])
my_mbedcrypto_lib = static_library('mbedcrypto',
mbedcrypto_src,