From owner-freebsd-questions@FreeBSD.ORG Wed Mar 11 13:53:31 2015 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7EE7A163 for ; Wed, 11 Mar 2015 13:53:31 +0000 (UTC) Received: from mx01.qsc.de (mx01.qsc.de [213.148.129.14]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3BA15EE2 for ; Wed, 11 Mar 2015 13:53:30 +0000 (UTC) Received: from r56.edvax.de (port-92-195-131-196.dynamic.qsc.de [92.195.131.196]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx01.qsc.de (Postfix) with ESMTPS id 448BA3CDA7; Wed, 11 Mar 2015 14:53:29 +0100 (CET) Received: from r56.edvax.de (localhost [127.0.0.1]) by r56.edvax.de (8.14.5/8.14.5) with SMTP id t2BDrS4t004941; Wed, 11 Mar 2015 14:53:28 +0100 (CET) (envelope-from freebsd@edvax.de) Date: Wed, 11 Mar 2015 14:53:28 +0100 From: Polytropon To: opendaddy@hushmail.com 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> Reply-To: Polytropon Organization: EDVAX X-Mailer: Sylpheed 3.1.1 (GTK+ 2.24.5; i386-portbld-freebsd8.2) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: freebsd-questions@freebsd.org X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Mar 2015 13:53:31 -0000 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, ...