Fix build.
Mac wants a stdlib.h. Windows wants a void and doesn't like static const in
array declarations.
Change-Id: If1e8fb141e41200cf8a7348c6918c2f22465f5fe
Reviewed-on: https://boringssl-review.googlesource.com/5030
Reviewed-by: Adam Langley <agl@google.com>
diff --git a/crypto/rsa/rsa_test.c b/crypto/rsa/rsa_test.c
index 7e2be3d..44d271a 100644
--- a/crypto/rsa/rsa_test.c
+++ b/crypto/rsa/rsa_test.c
@@ -563,20 +563,19 @@
return 1;
}
-static int test_multi_prime_keygen() {
+static int test_multi_prime_keygen(void) {
RSA *rsa = RSA_new();
BIGNUM e;
BN_init(&e);
static const char kMessage[] = "Hello world.";
- static const size_t kBits = 1024;
- uint8_t encrypted[kBits / 8], decrypted[kBits / 8];
+ uint8_t encrypted[1024 / 8], decrypted[1024 / 8];
size_t encrypted_len, decrypted_len;
if (rsa == NULL ||
!BN_set_word(&e, RSA_F4) ||
- !RSA_generate_multi_prime_key(rsa, kBits, 3, &e, NULL) ||
+ !RSA_generate_multi_prime_key(rsa, 1024, 3, &e, NULL) ||
!RSA_check_key(rsa) ||
!RSA_encrypt(rsa, &encrypted_len, encrypted, sizeof(encrypted),
(const uint8_t *)kMessage, sizeof(kMessage),
diff --git a/tool/args.cc b/tool/args.cc
index 850d9d8..9ec18a3 100644
--- a/tool/args.cc
+++ b/tool/args.cc
@@ -17,6 +17,7 @@
#include <limits.h>
#include <stdio.h>
+#include <stdlib.h>
#include <string.h>
#include "internal.h"