mirror of
https://github.com/curl/curl.git
synced 2026-08-25 10:53:37 +03:00
Fixed compile error with GNUTLS+NETTLE
In nettle/md5.h, md5_init and md5_update are defined as macros to nettle_md5_init and nettle_md5_update respectively. This causes error when using MD5_params.md5_init and md5_update. This patch renames these members as md5_init_func and md5_update_func to avoid name conflict. For completeness, MD5_params.md5_final was also renamed as md5_final_func. The changes in curl_ntlm_core.c is conversion error and fixed by casting to proper type.
This commit is contained in:
parent
0fd7fa7daf
commit
6cc066a2c5
3 changed files with 8 additions and 8 deletions
|
|
@ -445,7 +445,7 @@ MD5_context *Curl_MD5_init(const MD5_params *md5params)
|
|||
|
||||
ctxt->md5_hash = md5params;
|
||||
|
||||
md5params->md5_init(ctxt->md5_hashctx);
|
||||
(*md5params->md5_init_func)(ctxt->md5_hashctx);
|
||||
|
||||
return ctxt;
|
||||
}
|
||||
|
|
@ -454,14 +454,14 @@ int Curl_MD5_update(MD5_context *context,
|
|||
const unsigned char *data,
|
||||
unsigned int len)
|
||||
{
|
||||
(*context->md5_hash->md5_update)(context->md5_hashctx, data, len);
|
||||
(*context->md5_hash->md5_update_func)(context->md5_hashctx, data, len);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int Curl_MD5_final(MD5_context *context, unsigned char *result)
|
||||
{
|
||||
(*context->md5_hash->md5_final)(result, context->md5_hashctx);
|
||||
(*context->md5_hash->md5_final_func)(result, context->md5_hashctx);
|
||||
|
||||
free(context->md5_hashctx);
|
||||
free(context);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue