diff options
author | Michael Olbrich <m.olbrich@pengutronix.de> | 2021-06-22 16:52:07 +0200 |
---|---|---|
committer | Michael Olbrich <m.olbrich@pengutronix.de> | 2021-06-22 16:52:11 +0200 |
commit | d88f080fe436f72705d673fd26f05b8f49c4a7ec (patch) | |
tree | 4b0aa55616bc6c6dff6864fb7cf813fb2afdbe5c | |
parent | a6179b2827fe5e7fc4533f0c3ed2a331a4d7254c (diff) | |
download | extract-cert-d88f080fe436f72705d673fd26f05b8f49c4a7ec.tar.gz extract-cert-d88f080fe436f72705d673fd26f05b8f49c4a7ec.tar.xz |
explicitly build with -std=gnu89
The kernel builds extract-cert with this so do the same here. This ensures
that no features are used that needed a newer C standard. This avoids
problems when a old compiler is used that defaults to gnu89.
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
-rw-r--r-- | meson.build | 2 | ||||
-rw-r--r-- | spki-hash.c | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/meson.build b/meson.build index 994fecb..ec967c8 100644 --- a/meson.build +++ b/meson.build @@ -1,6 +1,6 @@ project('extract-cert', 'c', version : '0.1', - default_options : ['warning_level=3']) + default_options : ['warning_level=2', 'c_std=gnu89']) openssl_dep = dependency('openssl') diff --git a/spki-hash.c b/spki-hash.c index 7d82cf1..47bea50 100644 --- a/spki-hash.c +++ b/spki-hash.c @@ -74,7 +74,7 @@ static void drain_openssl_errors(void) static void do_hash_pkey(EVP_PKEY *pkey) { BIO *spki; void *spki_data; - size_t spki_len; + size_t spki_len, i; unsigned char md[SHA256_DIGEST_LENGTH]; spki = BIO_new(BIO_s_mem()); @@ -85,7 +85,7 @@ static void do_hash_pkey(EVP_PKEY *pkey) { ERR(1, "EVP_Digest"); } - for (size_t i = 0; i < sizeof(md); i++) { + for (i = 0; i < sizeof(md); i++) { printf("%02X", md[i]); } printf("\n"); |