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

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

wyattoday opened this issue Mar 29, 2019 · 2 comments


Copy link

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


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);
cc1: some warnings being treated as errors

Bug was introduced in this PR: #3611

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

@bagder bagder added the build label Mar 29, 2019
Copy link

bagder commented Mar 29, 2019

Curious that the CI builds nor my own builds get this... ?

Copy link
Contributor Author

Maybe your CI servers don't treat that warning as an error (implicit-function-declaration).

The toolset we use is based on the Redhat compilation of the gcc toolset (basically what amounts to devtoolset-8). My guess is they have -Werror=implicit-function-declaration set by default (seeing as they recommend it as a default)

bagder added a commit that referenced this issue Mar 30, 2019
@bagder bagder closed this as completed in fabd61f Mar 31, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Jun 30, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Successfully merging a pull request may close this issue.

2 participants