From patchwork Wed Sep 9 16:06:11 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vince Weaver X-Patchwork-Id: 33213 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by bilbo.ozlabs.org (Postfix) with ESMTPS id 8E00EB7067 for ; Thu, 10 Sep 2009 03:10:30 +1000 (EST) Received: from localhost ([127.0.0.1]:39447 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MlQgb-0007oi-Ng for incoming@patchwork.ozlabs.org; Wed, 09 Sep 2009 13:10:25 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MlPgi-0003LL-Ex for qemu-devel@nongnu.org; Wed, 09 Sep 2009 12:06:28 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MlPgd-0003CQ-MD for qemu-devel@nongnu.org; Wed, 09 Sep 2009 12:06:27 -0400 Received: from [199.232.76.173] (port=51551 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MlPgd-0003C5-CZ for qemu-devel@nongnu.org; Wed, 09 Sep 2009 12:06:23 -0400 Received: from csl.cornell.edu ([128.84.224.10]:2623 helo=vlsi.csl.cornell.edu) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MlPgc-0003He-Ta for qemu-devel@nongnu.org; Wed, 09 Sep 2009 12:06:23 -0400 Received: from stanley.csl.cornell.edu (stanley.csl.cornell.edu [128.84.224.15]) by vlsi.csl.cornell.edu (8.13.4/8.13.4) with ESMTP id n89G6BJ5053428 for ; Wed, 9 Sep 2009 12:06:17 -0400 (EDT) Date: Wed, 9 Sep 2009 12:06:11 -0400 (EDT) From: Vince Weaver To: qemu-devel@nongnu.org Message-ID: <20090909120328.R4195@stanley.csl.cornell.edu> MIME-Version: 1.0 X-detected-operating-system: by monty-python.gnu.org: FreeBSD 2.0-4.2 Subject: [Qemu-devel] [PATCH] linux-user F_DUPFD_CLOEXEC fix X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Hello on older machines, the F_DUPFD_CLOEXEC define is not available. So linux-user targets fail to compile. This fix simply disables the feature if it's not available. Vince Signed-off-by: Vince Weaver diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 25b95ea..6fdb9f1 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -3685,8 +3685,10 @@ static int target_to_host_fcntl_cmd(int cmd) return F_SETLEASE; case TARGET_F_GETLEASE: return F_GETLEASE; +#ifdef F_DUPFD_CLOEXEC case TARGET_F_DUPFD_CLOEXEC: return F_DUPFD_CLOEXEC; +#endif case TARGET_F_NOTIFY: return F_NOTIFY; default: