Skip to content

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

Description

@eschnett

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: https://buildkite.com/julialang/yggdrasil/builds/8147#_

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.

Activity

  1. added a commit that references this issue on Feb 5, 2024
    7a88e1a
  2. bagder commented on Feb 5, 2024

    @bagder
    Member

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

  3. added a commit that references this issue on Feb 5, 2024
    5cc2b01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions