From mboxrd@z Thu Jan 1 00:00:00 1970 From: Philipp Hahn Subject: Re: [PATCH v4] virtio-9p: fix build on !CONFIG_UTIMENSAT Date: Thu, 18 Nov 2010 14:12:13 +0100 Message-ID: <201011181412.26806.hahn@univention.de> References: <4CE47643.7030808@jp.fujitsu.com> <201011180928.16981.hahn@univention.de> <4CE4EC77.6030105@jp.fujitsu.com> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart1337607.DksXhNXior"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit To: kvm@vger.kernel.org Return-path: Received: from mail.univention.de ([82.198.197.8]:2064 "EHLO mail.univention.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752644Ab0KRNM2 (ORCPT ); Thu, 18 Nov 2010 08:12:28 -0500 Received: from localhost (localhost [127.0.0.1]) by slugis.knut.univention.de (Postfix) with ESMTP id EEEB2A6310A for ; Thu, 18 Nov 2010 14:11:48 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by slugis.knut.univention.de (Postfix) with ESMTP id DFD29A6310E for ; Thu, 18 Nov 2010 14:11:48 +0100 (CET) Received: from mail.univention.de ([127.0.0.1]) by localhost (slugis.knut.univention.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ZQcSUY1477xq for ; Thu, 18 Nov 2010 14:11:48 +0100 (CET) Received: from mammut.knut.univention.de (mammut.knut.univention.de [192.168.0.81]) by slugis.knut.univention.de (Postfix) with ESMTPSA id 80032A6310A for ; Thu, 18 Nov 2010 14:11:48 +0100 (CET) In-Reply-To: <4CE4EC77.6030105@jp.fujitsu.com> Sender: kvm-owner@vger.kernel.org List-ID: --nextPart1337607.DksXhNXior Content-Type: text/plain; charset="iso-2022-jp" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Hello, Am Donnerstag 18 November 2010 10:05:59 schrieb Hidetoshi Seto: > > Your have to be careful about compile-time-detection and > > runtime-detection: =2E.. > -#ifdef CONFIG_UTIMENSAT > - return utimensat(dirfd, path, times, flags); > -#else > + { > + int ret =3D utimensat(dirfd, path, times, flags); > + if (ret !=3D -1 || errno !=3D ENOSYS) { > + return ret; > + } > + } You might still want to do the compile-time-check, something like: #ifdef CONFIG_UTIMENSAT { int ret =3D utimensat(dirfd, path, times, flags); if (ret !=3D -1 || errno !=3D ENOSYS) { return ret; } } #endif // fallback Sincerely Philipp Hahn =2D-=20 Philipp Hahn Open Source Software Engineer hahn@univention.d= e =20 Univention GmbH Linux for Your Business fon: +49 421 22 232- 0 Mary-Somerville-Str.1 28359 Bremen fax: +49 421 22 232-99 http://www.univention.de --nextPart1337607.DksXhNXior Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) iEYEABECAAYFAkzlJi4ACgkQYPlgoZpUDjls8gCdFY3brObA/af0X5JOwq9jwtNW FZ8AoIa1IPSbTuAJLeAuJ9I5Xx+kqLKP =9OOT -----END PGP SIGNATURE----- --nextPart1337607.DksXhNXior--