From patchwork Sun Mar 28 08:15:14 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: takasi-y@ops.dti.ne.jp X-Patchwork-Id: 48771 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 ozlabs.org (Postfix) with ESMTPS id 192A8B7CFA for ; Sun, 28 Mar 2010 19:17:13 +1100 (EST) Received: from localhost ([127.0.0.1]:43291 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NvngE-0006Ts-1g for incoming@patchwork.ozlabs.org; Sun, 28 Mar 2010 04:17:10 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Nvneb-0005kN-HY for qemu-devel@nongnu.org; Sun, 28 Mar 2010 04:15:29 -0400 Received: from [140.186.70.92] (port=39647 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NvneZ-0005i7-G9 for qemu-devel@nongnu.org; Sun, 28 Mar 2010 04:15:28 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1NvneX-00034a-R1 for qemu-devel@nongnu.org; Sun, 28 Mar 2010 04:15:27 -0400 Received: from smtp12.dti.ne.jp ([202.216.231.187]:54722) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NvneX-00034K-8s for qemu-devel@nongnu.org; Sun, 28 Mar 2010 04:15:25 -0400 Received: from debian.lan (KHP059140016099.ppp-bb.dion.ne.jp [59.140.16.99]) by smtp12.dti.ne.jp (3.11s) with ESMTP AUTH id o2S8FEvj022108; Sun, 28 Mar 2010 17:15:14 +0900 (JST) Date: Sun, 28 Mar 2010 17:15:14 +0900 (JST) Message-Id: <201003280815.o2S8FEvj022108@smtp12.dti.ne.jp> From: takasi-y@ops.dti.ne.jp To: qemu-devel@nongnu.org X-Mailer: Sylpheed 2.5.0 (GTK+ 2.12.12; x86_64-pc-linux-gnu) Mime-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Solaris 9 Cc: Riku Voipio Subject: [Qemu-devel] [PATCH] Fix conditional compilation case CONFIG_INOTIFY && !CONFIG_INOTIFY1. 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 There is undefined reference to sys_inotify_init1() at do_syscall() when CONFIG_INOTIFY=y and CONFIG_INOTIFY1=n. We should undef TARGET_NR_inotify_init1 if CONFIG_INOTIFY1 is undefined, as it seems to be the strategy of conditional compilation here. Signed-off-by: Takashi YOSHII --- linux-user/syscall.c | 20 +++++++++++--------- 1 files changed, 11 insertions(+), 9 deletions(-) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 9ea990d..5050e60 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -506,22 +506,24 @@ static int sys_inotify_rm_watch(int fd, int32_t wd) return (inotify_rm_watch(fd, wd)); } #endif -#ifdef CONFIG_INOTIFY1 -#if defined(TARGET_NR_inotify_init1) && defined(__NR_inotify_init1) -static int sys_inotify_init1(int flags) -{ - return (inotify_init1(flags)); -} -#endif -#endif #else /* Userspace can usually survive runtime without inotify */ #undef TARGET_NR_inotify_init -#undef TARGET_NR_inotify_init1 #undef TARGET_NR_inotify_add_watch #undef TARGET_NR_inotify_rm_watch #endif /* CONFIG_INOTIFY */ +#ifdef CONFIG_INOTIFY1 +#include +#if defined(TARGET_NR_inotify_init1) && defined(__NR_inotify_init1) +static int sys_inotify_init1(int flags) +{ + return (inotify_init1(flags)); +} +#endif +#else +#undef TARGET_NR_inotify_init1 +#endif /* CONFIG_INOTIFY1 */ extern int personality(int); extern int flock(int, int);