From owner-freebsd-current@FreeBSD.ORG Mon Sep 10 05:19:54 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F3B94106564A for ; Mon, 10 Sep 2012 05:19:53 +0000 (UTC) (envelope-from davidxu@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id DE5018FC0A; Mon, 10 Sep 2012 05:19:53 +0000 (UTC) Received: from xyf.my.dom (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id q8A5Jq35025847; Mon, 10 Sep 2012 05:19:53 GMT (envelope-from davidxu@freebsd.org) Message-ID: <504D787A.30304@freebsd.org> Date: Mon, 10 Sep 2012 13:19:54 +0800 From: David Xu User-Agent: Mozilla/5.0 (X11; FreeBSD i386; rv:14.0) Gecko/20120822 Thunderbird/14.0 MIME-Version: 1.0 To: Kim Culhan References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-current@freebsd.org Subject: Re: 10-CURRENT clock_getcpuclockid() usage X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Sep 2012 05:19:54 -0000 On 2012/09/08 23:31, Kim Culhan wrote: > clock_getcpuclockid() was added a few weeks ago according to the man page and > I'm seeing this error while building the port net/freeswith-core-devel. > > The function is used in the Sofia-sip stack, courtesy Nokia Research Center, > incorporated into FreeSWITCH. > > The build system tests for the presence of clock_getcpuclockid() and finds it > but in the error messages 'clock_getcpuclockid2' is mentioned. > > Any thoughts on the clock_getcpuclockid() usage would be very greatly > appreciated. > > LTCOMPILE su_time.lo > su_time.c:410:14: error: implicit declaration of function > 'clock_getcpuclockid' is invalid in C99 > [-Werror,-Wimplicit-function-declaration] > else if (clock_getcpuclockid(0, &cpu) != -1 && > ^ > su_time.c:410:14: note: did you mean 'clock_getcpuclockid2'? > else if (clock_getcpuclockid(0, &cpu) != -1 && > ^~~~~~~~~~~~~~~~~~~ > clock_getcpuclockid2 > /usr/include/sys/time.h:352:5: note: 'clock_getcpuclockid2' declared here > int clock_getcpuclockid2(id_t, int, clockid_t *); > ^ > 1 error generated. > gmake[9]: *** [su_time.lo] Error 1 > > > thanks > -kim I have committed a patch, please try it. http://svnweb.freebsd.org/base/head/include/time.h?r1=233600&r2=240295