Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 11 Mar 2015 14:53:28 +0100
From:      Polytropon <freebsd@edvax.de>
To:        opendaddy@hushmail.com
Cc:        freebsd-questions@freebsd.org
Subject:   Re: Compiling cpulimit: warning: implicit declaration of function 'basename'
Message-ID:  <20150311145328.09853966.freebsd@edvax.de>
In-Reply-To: <20150311134458.AF7B8C0450@smtp.hushmail.com>
References:  <20150311122656.96F2020341@smtp.hushmail.com> <20150311141347.1013d42d.freebsd@edvax.de> <20150311134458.AF7B8C0450@smtp.hushmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, 11 Mar 2015 13:44:58 +0000, opendaddy@hushmail.com wrote:
> Hi!
> 
> Anybody know how to fix these cpulimit (https://github.com/opsengine/cpulimit/) build warnings?
> 
> They seem to make cpulimit prevent processes from getting more than 2% CPU.
> 
> # gmake
> cd src && gmake all
> gmake[1]: Entering directory '/root/cpulimit/src'
> cc -c list.c -Wall -g -D_GNU_SOURCE
> cc -c process_iterator.c -Wall -g -D_GNU_SOURCE
> cc -c process_group.c -Wall -g -D_GNU_SOURCE
> process_group.c:64:15: warning: implicit declaration of function 'basename'
>       is invalid in C99 [-Wimplicit-function-declaration]
>                 if (strncmp(basename(proc.command), process_name, str...
>                             ^

FreeBSD has a basename() function, interface in libgen.h, check
if included; also see "man 3 basename" for details. The following
warning is probably a "follow-up error".


-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20150311145328.09853966.freebsd>