Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build error: error: implicit declaration of function 'Curl_memdup' #12849

eschnett opened this issue Feb 2, 2024 · 1 comment

Build error: error: implicit declaration of function 'Curl_memdup' #12849

eschnett opened this issue Feb 2, 2024 · 1 comment


Copy link

eschnett commented Feb 2, 2024

I did this

I built curl 8.6.0. The build failed with this error message:

md4.c: In function 'MD4_Update':
[15:57:53] md4.c:197:5: error: implicit declaration of function 'Curl_memdup' [-Werror=implicit-function-declaration]
[15:57:53]      ctx->data = Curl_memdup(data, size);
[15:57:53]      ^
[15:57:53] md4.c:197:15: warning: assignment makes pointer from integer without a cast [enabled by default]
[15:57:53]      ctx->data = Curl_memdup(data, size);
[15:57:53]                ^
[15:57:53] cc1: some warnings being treated as errors
[15:57:53] make[2]: *** [Makefile:2733: libcurl_la-md4.lo] Error 1
[15:57:53] make[2]: *** Waiting for unfinished jobs....

Detailed information about configure options etc. are available here:

I think this patch

--- a/lib/md4.c
+++ b/lib/md4.c
@@ -23,6 +23,7 @@
 #include "curl_setup.h"
+#include "strdup.h"
 #if defined(USE_CURL_NTLM_CORE)

corrects the build error.

I expected the following

No response

curl/libcurl version

curl 8.6.0

operating system

Building on x86-64 Linux musl, building for i686 Linux GNU (cross build).

This build was run on CI infrastructure and I do not have access to the output of uname -a.

@bagder bagder added the build label Feb 5, 2024
bagder added a commit that referenced this issue Feb 5, 2024
Reported-by: Erik Schnetter
Fixes: #12849
Copy link

bagder commented Feb 5, 2024

I propose a minor edit on your take, see #12863

@bagder bagder closed this as completed in 5cc2b01 Feb 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Successfully merging a pull request may close this issue.

2 participants