mirror of
https://github.com/curl/curl.git
synced 2026-06-06 17:44:16 +03:00
curl_setup.h avoid GnuTLS wolfSSL MD4_CTX type conflict
-DCURL_USE_GNUTLS=ON -DCURL_USE_WOLFSSL=ON
```
lib/md4.c:98:24: error: typedef redefinition with different types ('struct md4_ctx' vs 'WOLFSSL_MD4_CTX' (aka 'struct WOLFSSL_MD4_CTX'))
98 | typedef struct md4_ctx MD4_CTX;
| ^
/opt/homebrew/Cellar/wolfssl/5.8.0/include/wolfssl/openssl/md4.h:51:25: note: previous definition is here
51 | typedef WOLFSSL_MD4_CTX MD4_CTX;
| ^
In file included from _buildroulette/bld/lib/CMakeFiles/curlu.dir/Unity/unity_0_c.c:235:
lib/md4.c💯12: error: static declaration of 'wolfSSL_MD4_Init' follows non-static declaration
100 | static int MD4_Init(MD4_CTX *ctx)
| ^
/opt/homebrew/Cellar/wolfssl/5.8.0/include/wolfssl/openssl/ssl.h:859:41: note: expanded from macro 'MD4_Init'
859 | #define MD4_Init wolfSSL_MD4_Init
| ^
/opt/homebrew/Cellar/wolfssl/5.8.0/include/wolfssl/openssl/md4.h:44:18: note: previous declaration is here
44 | WOLFSSL_API void wolfSSL_MD4_Init(WOLFSSL_MD4_CTX* md4);
| ^
In file included from _buildroulette/bld/lib/CMakeFiles/curlu.dir/Unity/unity_0_c.c:235:
lib/md4.c:102:12: error: incompatible pointer types passing 'MD4_CTX *' (aka 'struct WOLFSSL_MD4_CTX *') to parameter of type 'struct md4_ctx *' [-Werror,-Wincompatible-pointer-types]
102 | md4_init(ctx);
| ^~~
/opt/homebrew/Cellar/nettle/3.10.2/include/nettle/md4.h:66:26: note: passing argument to parameter 'ctx' here
66 | md4_init(struct md4_ctx *ctx);
| ^
In file included from _buildroulette/bld/lib/CMakeFiles/curlu.dir/Unity/unity_0_c.c:235:
lib/md4.c:106:13: error: static declaration of 'wolfSSL_MD4_Update' follows non-static declaration
106 | static void MD4_Update(MD4_CTX *ctx, const void *data, unsigned long size)
| ^
/opt/homebrew/Cellar/wolfssl/5.8.0/include/wolfssl/openssl/ssl.h:860:41: note: expanded from macro 'MD4_Update'
860 | #define MD4_Update wolfSSL_MD4_Update
| ^
/opt/homebrew/Cellar/wolfssl/5.8.0/include/wolfssl/openssl/md4.h:45:18: note: previous declaration is here
45 | WOLFSSL_API void wolfSSL_MD4_Update(WOLFSSL_MD4_CTX* md4, const void* data,
| ^
In file included from _buildroulette/bld/lib/CMakeFiles/curlu.dir/Unity/unity_0_c.c:235:
lib/md4.c:108:14: error: incompatible pointer types passing 'MD4_CTX *' (aka 'struct WOLFSSL_MD4_CTX *') to parameter of type 'struct md4_ctx *' [-Werror,-Wincompatible-pointer-types]
108 | md4_update(ctx, size, data);
| ^~~
/opt/homebrew/Cellar/nettle/3.10.2/include/nettle/md4.h:69:28: note: passing argument to parameter 'ctx' here
69 | md4_update(struct md4_ctx *ctx,
| ^
In file included from _buildroulette/bld/lib/CMakeFiles/curlu.dir/Unity/unity_0_c.c:235:
lib/md4.c:111:13: error: static declaration of 'wolfSSL_MD4_Final' follows non-static declaration
111 | static void MD4_Final(unsigned char *result, MD4_CTX *ctx)
| ^
/opt/homebrew/Cellar/wolfssl/5.8.0/include/wolfssl/openssl/ssl.h:861:41: note: expanded from macro 'MD4_Final'
861 | #define MD4_Final wolfSSL_MD4_Final
| ^
/opt/homebrew/Cellar/wolfssl/5.8.0/include/wolfssl/openssl/md4.h:47:18: note: previous declaration is here
47 | WOLFSSL_API void wolfSSL_MD4_Final(unsigned char* digest, WOLFSSL_MD4_CTX* md4);
| ^
In file included from _buildroulette/bld/lib/CMakeFiles/curlu.dir/Unity/unity_0_c.c:235:
lib/md4.c:113:14: error: incompatible pointer types passing 'MD4_CTX *' (aka 'struct WOLFSSL_MD4_CTX *') to parameter of type 'struct md4_ctx *' [-Werror,-Wincompatible-pointer-types]
113 | md4_digest(ctx, MD4_DIGEST_SIZE, result);
| ^~~
/opt/homebrew/Cellar/nettle/3.10.2/include/nettle/md4.h:74:28: note: passing argument to parameter 'ctx' here
74 | md4_digest(struct md4_ctx *ctx,
| ^
7 errors generated.
```
This commit is contained in:
parent
c7cf70453b
commit
bdf240b7fa
1 changed files with 4 additions and 0 deletions
|
|
@ -739,6 +739,10 @@
|
|||
#if defined(USE_WOLFSSL) && defined(USE_GNUTLS)
|
||||
/* Avoid defining unprefixed wolfSSL SHA macros colliding with nettle ones */
|
||||
#define NO_OLD_WC_NAMES
|
||||
/* Prevent wolfSSL headers including wolfssl/openssl/md4.h, to avoid its MD4_CTX
|
||||
type clashing with the one defined via nettle/md4.h, and used in md4.c when
|
||||
GnuTLS is enabled. */
|
||||
#define NO_MD4
|
||||
#endif
|
||||
|
||||
/* Single point where USE_SPNEGO definition might be defined */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue