summaryrefslogtreecommitdiffstats
path: root/recipes-connectivity/openssl/openssl-qoriq/qoriq/0040-cryptodev-replace-caddr_t-with-void.patch
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-connectivity/openssl/openssl-qoriq/qoriq/0040-cryptodev-replace-caddr_t-with-void.patch')
-rw-r--r--recipes-connectivity/openssl/openssl-qoriq/qoriq/0040-cryptodev-replace-caddr_t-with-void.patch95
1 files changed, 95 insertions, 0 deletions
diff --git a/recipes-connectivity/openssl/openssl-qoriq/qoriq/0040-cryptodev-replace-caddr_t-with-void.patch b/recipes-connectivity/openssl/openssl-qoriq/qoriq/0040-cryptodev-replace-caddr_t-with-void.patch
new file mode 100644
index 0000000..2c61d9b
--- /dev/null
+++ b/recipes-connectivity/openssl/openssl-qoriq/qoriq/0040-cryptodev-replace-caddr_t-with-void.patch
@@ -0,0 +1,95 @@
1From 45429e5ea075867f9219a6fcb233677d062a4451 Mon Sep 17 00:00:00 2001
2From: Cristian Stoica <cristian.stoica@nxp.com>
3Date: Tue, 9 Feb 2016 11:28:23 +0200
4Subject: [PATCH 40/48] cryptodev: replace caddr_t with void *
5
6This avoids warnings such as "pointer targets in assignment differ in
7signedness" when compiling the code
8
9Signed-off-by: Cristian Stoica <cristian.stoica@nxp.com>
10---
11 crypto/engine/eng_cryptodev.c | 22 +++++++++++-----------
12 1 file changed, 11 insertions(+), 11 deletions(-)
13
14diff --git a/crypto/engine/eng_cryptodev.c b/crypto/engine/eng_cryptodev.c
15index 2791ca3..f172173 100644
16--- a/crypto/engine/eng_cryptodev.c
17+++ b/crypto/engine/eng_cryptodev.c
18@@ -460,8 +460,8 @@ static int get_cryptodev_ciphers(const int **cnids)
19 return (0);
20 }
21 memset(&sess, 0, sizeof(sess));
22- sess.key = (caddr_t) "123456789abcdefghijklmno";
23- sess.mackey = (caddr_t) "123456789ABCDEFGHIJKLMNO";
24+ sess.key = (void *)"123456789abcdefghijklmno";
25+ sess.mackey = (void *)"123456789ABCDEFGHIJKLMNO";
26
27 for (i = 0; ciphers[i].id && count < CRYPTO_ALGORITHM_MAX; i++) {
28 if (ciphers[i].nid == NID_undef)
29@@ -501,7 +501,7 @@ static int get_cryptodev_digests(const int **cnids)
30 return (0);
31 }
32 memset(&sess, 0, sizeof(sess));
33- sess.mackey = (caddr_t) "123456789abcdefghijklmno";
34+ sess.mackey = (void *)"123456789abcdefghijklmno";
35 for (i = 0; digests[i].id && count < CRYPTO_ALGORITHM_MAX; i++) {
36 if (digests[i].nid == NID_undef)
37 continue;
38@@ -633,14 +633,14 @@ cryptodev_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
39 cryp.ses = sess->ses;
40 cryp.flags = 0;
41 cryp.len = inl;
42- cryp.src = (caddr_t) in;
43- cryp.dst = (caddr_t) out;
44+ cryp.src = (void *)in;
45+ cryp.dst = (void *)out;
46 cryp.mac = 0;
47
48 cryp.op = ctx->encrypt ? COP_ENCRYPT : COP_DECRYPT;
49
50 if (ctx->cipher->iv_len) {
51- cryp.iv = (caddr_t) ctx->iv;
52+ cryp.iv = (void *)ctx->iv;
53 if (!ctx->encrypt) {
54 iiv = in + inl - ctx->cipher->iv_len;
55 memcpy(save_iv, iiv, ctx->cipher->iv_len);
56@@ -701,15 +701,15 @@ static int cryptodev_aead_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
57 }
58 cryp.ses = sess->ses;
59 cryp.len = state->len;
60- cryp.src = (caddr_t) in;
61- cryp.dst = (caddr_t) out;
62+ cryp.src = (void *)in;
63+ cryp.dst = (void *)out;
64 cryp.auth_src = state->aad;
65 cryp.auth_len = state->aad_len;
66
67 cryp.op = ctx->encrypt ? COP_ENCRYPT : COP_DECRYPT;
68
69 if (ctx->cipher->iv_len) {
70- cryp.iv = (caddr_t) ctx->iv;
71+ cryp.iv = (void *)ctx->iv;
72 if (!ctx->encrypt) {
73 iiv = in + len - ctx->cipher->iv_len;
74 memcpy(save_iv, iiv, ctx->cipher->iv_len);
75@@ -761,7 +761,7 @@ cryptodev_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key,
76 if ((state->d_fd = get_dev_crypto()) < 0)
77 return (0);
78
79- sess->key = (caddr_t) key;
80+ sess->key = (void *)key;
81 sess->keylen = ctx->key_len;
82 sess->cipher = cipher;
83
84@@ -804,7 +804,7 @@ static int cryptodev_init_aead_key(EVP_CIPHER_CTX *ctx,
85
86 memset(sess, 0, sizeof(struct session_op));
87
88- sess->key = (caddr_t) key;
89+ sess->key = (void *)key;
90 sess->keylen = ctx->key_len;
91 sess->cipher = cipher;
92
93--
942.7.0
95