signalapp / libsignal-protocol-c

GNU General Public License v3.0
1.41k stars 295 forks source link

Add limits.h include to provide INT_MAX. #118

Closed blackgnezdo closed 5 years ago

blackgnezdo commented 5 years ago

This is required per POSIX: http://pubs.opengroup.org/onlinepubs/009604499/basedefs/limits.h.html

Otherwise test build is failing on OpenBSD:

libsignal-protocol-c/tests/test_common_openssl.c:218:24: error: use of undeclared identifier 'INT_MAX'
    if(plaintext_len > INT_MAX - EVP_CIPHER_block_size(evp_cipher)) {
                       ^
dkonigsberg commented 5 years ago

Since other files using INT_MAX already include this, there's no reason not to just add it here.