Compiling cpulimit: warning: implicit declaration of function 'basename'
freebsd at edvax.de
Wed Mar 11 13:53:31 UTC 2015
On Wed, 11 Mar 2015 13:44:58 +0000, opendaddy at hushmail.com wrote:
> 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: 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".
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
More information about the freebsd-questions