c - Field ' ' could not be resolved -
currently trying compile kernel module in userspace. module is
aes_generic.c
so far commented kernel headers , started fixing compile errors u8 not available simpyl replaced uint8_t these errors gone now
i struggling error field '' not resolved
this error appears in various fields
here's example:
#define loop8(i) { \ loop8tophalf(i); \ t = ctx->key_enc[8 * + 4] ^ ls_box(t); \ ctx->key_enc[8 * + 12] = t; \ t ^= ctx->key_enc[8 * + 5]; \ ctx->key_enc[8 * + 13] = t; \ t ^= ctx->key_enc[8 * + 6]; \ ctx->key_enc[8 * + 14] = t; \ t ^= ctx->key_enc[8 * + 7]; \ ctx->key_enc[8 * + 15] = t; \ } while (0)
error:
field 'loop8(i)' not resolved
more code same error message:
int crypto_aes_expand_key(struct crypto_aes_ctx *ctx, const uint8_t *in_key, unsigned int key_len) { const __le32 *key = (const __le32 *)in_key; uint32_t i, t, u, v, w, j; if (key_len != aes_keysize_128 && key_len != aes_keysize_192 && key_len != aes_keysize_256) return -einval; ctx->key_length = key_len; ctx->key_dec[key_len + 24] = ctx->key_enc[0] = le32_to_cpu(key[0]); ctx->key_dec[key_len + 25] = ctx->key_enc[1] = le32_to_cpu(key[1]); ctx->key_dec[key_len + 26] = ctx->key_enc[2] = le32_to_cpu(key[2]); ctx->key_dec[key_len + 27] = ctx->key_enc[3] = le32_to_cpu(key[3]); switch (key_len) { case aes_keysize_128: t = ctx->key_enc[3]; (i = 0; < 10; ++i) loop4(i); break; case aes_keysize_192: ctx->key_enc[4] = le32_to_cpu(key[4]); t = ctx->key_enc[5] = le32_to_cpu(key[5]); (i = 0; < 8; ++i) loop6(i); break; case aes_keysize_256: ctx->key_enc[4] = le32_to_cpu(key[4]); ctx->key_enc[5] = le32_to_cpu(key[5]); ctx->key_enc[6] = le32_to_cpu(key[6]); t = ctx->key_enc[7] = le32_to_cpu(key[7]); (i = 0; < 6; ++i) loop8(i); loop8tophalf(i); break; } ctx->key_dec[0] = ctx->key_enc[key_len + 24]; ctx->key_dec[1] = ctx->key_enc[key_len + 25]; ctx->key_dec[2] = ctx->key_enc[key_len + 26]; ctx->key_dec[3] = ctx->key_enc[key_len + 27]; (i = 4; < key_len + 24; ++i) { j = key_len + 24 - (i & ~3) + (i & 3); imix_col(ctx->key_dec[j], ctx->key_enc[i]); } return 0; }
edit: these errors fixed, manually editiong aes.h , including in userspace file help
Comments
Post a Comment