diff options
author | Bartosz Golaszewski <bgolaszewski@baylibre.com> | 2020-01-09 17:16:36 +0100 |
---|---|---|
committer | Masahiro Yamada <masahiroy@kernel.org> | 2020-01-10 02:44:54 +0900 |
commit | ba82f52e2287f55ae10f4123980198b6ea8a8dc6 (patch) | |
tree | ef68b4d60940c8b17c4bf9d88f820236da64d39f /scripts/kconfig/nconf.c | |
parent | a9609686042b887baa636c77646b7614074c180a (diff) |
kconfig: fix an "implicit declaration of function" warning
strncasecmp() & strcasecmp() functions are declared in strings.h, not
string.h. On most environments the former is implicitly included by
the latter but on some setups, building menuconfig results in the
following warning:
HOSTCC scripts/kconfig/mconf.o
scripts/kconfig/mconf.c: In function ‘search_conf’:
scripts/kconfig/mconf.c:423:6: warning: implicit declaration of function ‘strncasecmp’ [-Wimplicit-function-declaration]
if (strncasecmp(dialog_input_result, CONFIG_, strlen(CONFIG_)) == 0)
^~~~~~~~~~~
scripts/kconfig/mconf.c: In function ‘main’:
scripts/kconfig/mconf.c:1021:8: warning: implicit declaration of function ‘strcasecmp’ [-Wimplicit-function-declaration]
if (!strcasecmp(mode, "single_menu"))
^~~~~~~~~~
Fix it by explicitly including strings.h.
Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Diffstat (limited to 'scripts/kconfig/nconf.c')
-rw-r--r-- | scripts/kconfig/nconf.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/scripts/kconfig/nconf.c b/scripts/kconfig/nconf.c index b7c1ef757178..daf1c1506ec4 100644 --- a/scripts/kconfig/nconf.c +++ b/scripts/kconfig/nconf.c @@ -8,6 +8,7 @@ #define _GNU_SOURCE #endif #include <string.h> +#include <strings.h> #include <stdlib.h> #include "lkc.h" |