Return-Path: Received: from mail-wr1-f66.google.com ([209.85.221.66]:42784 "EHLO mail-wr1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728120AbgAIM4b (ORCPT ); Thu, 9 Jan 2020 07:56:31 -0500 Received: by mail-wr1-f66.google.com with SMTP id q6so7255356wro.9 for ; Thu, 09 Jan 2020 04:56:30 -0800 (PST) From: Bartosz Golaszewski Subject: [PATCH] kconfig: fix an "implicit declaration of function" warning Date: Thu, 9 Jan 2020 13:56:27 +0100 Message-Id: <20200109125627.24654-1-brgl@bgdev.pl> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kbuild-owner@vger.kernel.org List-ID: To: Masahiro Yamada Cc: linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org, Bartosz Golaszewski From: Bartosz Golaszewski 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 --- scripts/kconfig/mconf.c | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/kconfig/mconf.c b/scripts/kconfig/mconf.c index 49c26ea9dd98..4063dbc1b927 100644 --- a/scripts/kconfig/mconf.c +++ b/scripts/kconfig/mconf.c @@ -15,6 +15,7 @@ #include #include #include +#include #include #include -- 2.23.0