diff options
author | Andreas Schneider <asn@cryptomilk.org> | 2018-08-13 09:14:15 +0200 |
---|---|---|
committer | Andreas Schneider <asn@cryptomilk.org> | 2018-08-13 11:00:47 +0200 |
commit | 6708debd4c2d2b74cea5891d6351024d2c2600fd (patch) | |
tree | 0bd61ba8739bd8b5db1d79af4acec7f55a86c9bd | |
parent | 852a8b487517f611a0bbc3f6c7400c0710f91487 (diff) | |
download | libssh-6708debd4c2d2b74cea5891d6351024d2c2600fd.tar.gz libssh-6708debd4c2d2b74cea5891d6351024d2c2600fd.tar.xz libssh-6708debd4c2d2b74cea5891d6351024d2c2600fd.zip |
cmake: Fix check for bounded attribute
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
(cherry picked from commit e04a8b3abd87fd31eab550831c030000b87f83b4)
-rw-r--r-- | ConfigureChecks.cmake | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/ConfigureChecks.cmake b/ConfigureChecks.cmake index 07c53c73..d1c4d2ca 100644 --- a/ConfigureChecks.cmake +++ b/ConfigureChecks.cmake @@ -334,9 +334,13 @@ int main(void) { 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) +#define ARRAY_LEN 16 +void test_attr(const unsigned char *k) + __attribute__((__bounded__(__minbytes__, 2, 16))); + +int main(void) { + return 0; +}" HAVE_GCC_BOUNDED_ATTRIBUTE) if (WITH_DEBUG_CRYPTO) set(DEBUG_CRYPTO 1) |