From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=43949 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P7klq-0006xx-OW for qemu-devel@nongnu.org; Mon, 18 Oct 2010 04:08:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1P7klj-0007rQ-CI for qemu-devel@nongnu.org; Mon, 18 Oct 2010 04:08:32 -0400 Received: from mx1.redhat.com ([209.132.183.28]:21326) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1P7klj-0007rL-5O for qemu-devel@nongnu.org; Mon, 18 Oct 2010 04:08:31 -0400 Message-ID: <4CBC007B.6090601@redhat.com> Date: Mon, 18 Oct 2010 10:08:27 +0200 From: Jes Sorensen MIME-Version: 1.0 References: <1287245083-26110-1-git-send-email-Jes.Sorensen@redhat.com> <1287245083-26110-6-git-send-email-Jes.Sorensen@redhat.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] Re: [PATCH 5/9] Move qemu_gettimeofday() to OS specific files List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Blue Swirl Cc: pbonzini@redhat.com, qemu-devel@nongnu.org On 10/16/10 21:32, Blue Swirl wrote: > On Sat, Oct 16, 2010 at 4:04 PM, wrote: >> From: Jes Sorensen >> >> In addition add sysemu.h includes to file requiring a prototype for >> ffs() > > There are probably a lot more files which would need that: > /src/qemu/hw/sd.c: In function 'sd_normal_command': > /src/qemu/hw/sd.c:738:13: error: implicit declaration of function > 'ffs' [-Werror=implicit-function-declaration] > /src/qemu/hw/max7310.c: In function 'max7310_tx': > /src/qemu/hw/max7310.c:94:13: error: implicit declaration of function > 'ffs' [-Werror=implicit-function-declaration] > /src/qemu/hw/unin_pci.c: In function 'unin_get_config_reg': > /src/qemu/hw/unin_pci.c:101:9: error: implicit declaration of function > 'ffs' [-Werror=implicit-function-declaration] > > Perhaps the prototype should be added someplace else. I guess we'll have to bite the bullet. I don't really like it, but I moved it to qemu-common.h to be consistent with the POSIX code. POSIX relies on ffs() to be provided by strings.h which we include in qemu-common.h Should build (I hope) in the next patch. I tried building arm-softmmu here but it wouldn't build for me at all due to other things so I couldn't test it. Cheers, Jes