From patchwork Tue Jul 12 20:27:15 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 2675 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 5A9C923F55 for ; Tue, 12 Jul 2011 20:27:22 +0000 (UTC) Received: from mail-qw0-f52.google.com (mail-qw0-f52.google.com [209.85.216.52]) by fiordland.canonical.com (Postfix) with ESMTP id 1BC82A180E6 for ; Tue, 12 Jul 2011 20:27:22 +0000 (UTC) Received: by qwb8 with SMTP id 8so3643172qwb.11 for ; Tue, 12 Jul 2011 13:27:21 -0700 (PDT) Received: by 10.229.25.212 with SMTP id a20mr353727qcc.148.1310502441528; Tue, 12 Jul 2011 13:27:21 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.229.217.78 with SMTP id hl14cs254787qcb; Tue, 12 Jul 2011 13:27:21 -0700 (PDT) Received: by 10.216.188.129 with SMTP id a1mr2827743wen.52.1310502439887; Tue, 12 Jul 2011 13:27:19 -0700 (PDT) Received: from mnementh.archaic.org.uk (mnementh.archaic.org.uk [81.2.115.146]) by mx.google.com with ESMTPS id v34si28870021weq.1.2011.07.12.13.27.19 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 12 Jul 2011 13:27:19 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of pm215@archaic.org.uk designates 81.2.115.146 as permitted sender) client-ip=81.2.115.146; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of pm215@archaic.org.uk designates 81.2.115.146 as permitted sender) smtp.mail=pm215@archaic.org.uk Received: from pm215 by mnementh.archaic.org.uk with local (Exim 4.72) (envelope-from ) id 1QgjY3-0007j0-RS; Tue, 12 Jul 2011 21:27:15 +0100 From: Peter Maydell To: qemu-devel@nongnu.org Cc: patches@linaro.org, Ulrich Hecht , Alexander Graf , Riku Voipio Subject: [PATCH] linux-user/signal.c: Rename s390 target_ucontext fields to fix ia64 Date: Tue, 12 Jul 2011 21:27:15 +0100 Message-Id: <1310502435-29671-1-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 1.7.2.5 The ia64 sys/ucontext.h defines macros 'uc_link', 'uc_sigmask' and 'uc_stack'. Rename the s390 target_ucontext struct members to tuc_*, bringing them into line with the other targets and fixing a compile failure on ia64 hosts caused by this clash. Signed-off-by: Peter Maydell --- linux-user/signal.c | 30 +++++++++++++++--------------- 1 files changed, 15 insertions(+), 15 deletions(-) diff --git a/linux-user/signal.c b/linux-user/signal.c index 7d168e1..07ad07a 100644 --- a/linux-user/signal.c +++ b/linux-user/signal.c @@ -3662,11 +3662,11 @@ typedef struct { } sigframe; struct target_ucontext { - target_ulong uc_flags; - struct target_ucontext *uc_link; - target_stack_t uc_stack; - target_sigregs uc_mcontext; - target_sigset_t uc_sigmask; /* mask last for extensibility */ + target_ulong tuc_flags; + struct target_ucontext *tuc_link; + target_stack_t tuc_stack; + target_sigregs tuc_mcontext; + target_sigset_t tuc_sigmask; /* mask last for extensibility */ }; typedef struct { @@ -3814,16 +3814,16 @@ static void setup_rt_frame(int sig, struct target_sigaction *ka, } /* Create the ucontext. */ - __put_user(0, &frame->uc.uc_flags); - __put_user((abi_ulong)0, (abi_ulong *)&frame->uc.uc_link); - __put_user(target_sigaltstack_used.ss_sp, &frame->uc.uc_stack.ss_sp); + __put_user(0, &frame->uc.tuc_flags); + __put_user((abi_ulong)0, (abi_ulong *)&frame->uc.tuc_link); + __put_user(target_sigaltstack_used.ss_sp, &frame->uc.tuc_stack.ss_sp); __put_user(sas_ss_flags(get_sp_from_cpustate(env)), - &frame->uc.uc_stack.ss_flags); - __put_user(target_sigaltstack_used.ss_size, &frame->uc.uc_stack.ss_size); - save_sigregs(env, &frame->uc.uc_mcontext); + &frame->uc.tuc_stack.ss_flags); + __put_user(target_sigaltstack_used.ss_size, &frame->uc.tuc_stack.ss_size); + save_sigregs(env, &frame->uc.tuc_mcontext); for (i = 0; i < TARGET_NSIG_WORDS; i++) { __put_user((abi_ulong)set->sig[i], - (abi_ulong *)&frame->uc.uc_sigmask.sig[i]); + (abi_ulong *)&frame->uc.tuc_sigmask.sig[i]); } /* Set up to return from userspace. If provided, use a stub @@ -3928,15 +3928,15 @@ long do_rt_sigreturn(CPUState *env) if (!lock_user_struct(VERIFY_READ, frame, frame_addr, 1)) { goto badframe; } - target_to_host_sigset(&set, &frame->uc.uc_sigmask); + target_to_host_sigset(&set, &frame->uc.tuc_sigmask); sigprocmask(SIG_SETMASK, &set, NULL); /* ~_BLOCKABLE? */ - if (restore_sigregs(env, &frame->uc.uc_mcontext)) { + if (restore_sigregs(env, &frame->uc.tuc_mcontext)) { goto badframe; } - if (do_sigaltstack(frame_addr + offsetof(rt_sigframe, uc.uc_stack), 0, + if (do_sigaltstack(frame_addr + offsetof(rt_sigframe, uc.tuc_stack), 0, get_sp_from_cpustate(env)) == -EFAULT) { goto badframe; }