Skip to content

tool_help.c compilation failure: error: implicit declaration of function ‘strcasecmp’; did you mean ‘strncmp’? #3715

Closed
@wyattoday

Description

@wyattoday

I did this

Compile curl using gcc 8.2.1. (using x86 compiler, but it doesn't matter)

I expected the following

Successful build.

curl/libcurl version

7.64.1

operating system

CentOS 6.

The build failed when compiling "tool_help.c":

tool_help.c: In function ‘featcomp’:
tool_help.c:553:10: error: implicit declaration of function ‘strcasecmp’; did you mean ‘strncmp’? [-Werror=implicit-function-declaration]
   return strcasecmp(* (char * const *) p1, * (char * const *) p2);
          ^~~~~~~~~~
          strncmp
cc1: some warnings being treated as errors

Bug was introduced in this PR: #3611

Solution: add #include <strings.h> above the "memdebug.h" include.

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