From 78b993dbb4d58aec8cb5b32f23014eeabd900f2f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20G=C3=B6ttsche?= Date: Tue, 12 Jan 2021 19:05:46 +0100 Subject: kfreeBSD: include config.h for _GNU_SOURCE (part 2) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit strcasestr(3) is a GNU extension and when compiling freebsd/Platform.c on kfreebsd for Debian is included before we define _GNU_SOURCE, so the function is not available. In file included from ./Object.h:16, from ./ListItem.h:12, from ./Meter.h:16, from ./Header.h:10, from ./Action.h:15, from freebsd/Platform.h:13, from freebsd/Platform.c:8: ./XUtils.h: In function ‘String_contains_i’: ./XUtils.h:43:11: warning: implicit declaration of function ‘strcasestr’; did you mean ‘strcasecmp’? [-Wimplicit-function-declaration] 43 | return strcasestr(s1, s2) != NULL; | ^~~~~~~~~~ | strcasecmp ./XUtils.h:43:30: warning: comparison between pointer and integer 43 | return strcasestr(s1, s2) != NULL; | ^~ In file included from ./Object.h:16, from ./ProcessList.h:16, from freebsd/FreeBSDProcessList.h:15, from freebsd/FreeBSDProcessList.c:8: ./XUtils.h: In function ‘String_contains_i’: ./XUtils.h:43:11: warning: implicit declaration of function ‘strcasestr’; did you mean ‘strcasecmp’? [-Wimplicit-function-declaration] 43 | return strcasestr(s1, s2) != NULL; | ^~~~~~~~~~ | strcasecmp ./XUtils.h:43:30: warning: comparison between pointer and integer 43 | return strcasestr(s1, s2) != NULL; | ^~ --- freebsd/FreeBSDProcessList.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/freebsd/FreeBSDProcessList.c b/freebsd/FreeBSDProcessList.c index 679f640d..af60abbf 100644 --- a/freebsd/FreeBSDProcessList.c +++ b/freebsd/FreeBSDProcessList.c @@ -5,6 +5,8 @@ Released under the GNU GPLv2, see the COPYING file in the source distribution for its full text. */ +#include "config.h" // IWYU pragma: keep + #include "FreeBSDProcessList.h" #include -- cgit v1.2.3