1
0
mirror of https://git.libssh.org/projects/libssh.git synced 2025-08-01 11:26:52 +03:00

cmake: detect "bounded" compiler attribute

Signed-off-by: Aris Adamantiadis <aris@0xbadc0de.be>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
This commit is contained in:
Aris Adamantiadis
2018-02-28 10:24:52 -06:00
committed by Andreas Schneider
parent acc1ade74a
commit ebd76bf347
4 changed files with 23 additions and 4 deletions

View File

@ -327,6 +327,11 @@ int main(void) {
}" HAVE_COMPILER__FUNCTION__)
check_c_source_compiles("
void chacha_keysetup(struct chacha_ctx *x, const u_char *k, u_int kbits)
__attribute__((__bounded__(__minbytes__, 2, CHACHA_MINKEYLEN)));
int main(void) { return 0; }" HAVE_GCC_BOUNDED_ATTRIBUTE)
if (WITH_DEBUG_CRYPTO)
set(DEBUG_CRYPTO 1)
endif (WITH_DEBUG_CRYPTO)