From patchwork Tue Aug 12 13:33:18 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 35256 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qa0-f69.google.com (mail-qa0-f69.google.com [209.85.216.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id A512120540 for ; Tue, 12 Aug 2014 13:33:40 +0000 (UTC) Received: by mail-qa0-f69.google.com with SMTP id v10sf26540449qac.4 for ; Tue, 12 Aug 2014 06:33:40 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe; bh=YE44iftc05uzJM0ko4on1zh1Qh64NTLLVhqNxG9OLBM=; b=YWjwUi43mu+uV4/3e+OUsVXa8QLOZUJpB9aa1nw/2yl37HzeJ50pk70BF92wg3gOm8 TnBIjBoYDhtrG43tAoc34w0BMiQi3PkMtpIOVM2G6RsES9ihc6f3UvofdQL6uq5XX6Ok HPoB97lFOiauorFUaSiDdewvfve46KXArVCeoDjIt8HppXskNL+TrqU+aNh703ue0MAD M1FXTTLRzZPP7hnp8aV72rbNrRxdMQF9EqkFYv3DJyPOSoCMZgdYMI/lKI0Xhb9XH9q+ gSrYMGyGR+gFwGW67oXf0tYCsTZIq6Fna/rRkcqbtVovAstCVoN7a1sF6dB4skkgrQOM Tzkw== X-Gm-Message-State: ALoCoQk7YnZDkSipOyMa6OO6AB/6486++gCJMvi8OMaSChvuicFiMNat0Qiif7xFPpLWjrUOfdwY X-Received: by 10.236.14.99 with SMTP id c63mr17231852yhc.40.1407850420470; Tue, 12 Aug 2014 06:33:40 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.17.45 with SMTP id 42ls136177qgc.47.gmail; Tue, 12 Aug 2014 06:33:40 -0700 (PDT) X-Received: by 10.52.232.200 with SMTP id tq8mr23616889vdc.32.1407850420377; Tue, 12 Aug 2014 06:33:40 -0700 (PDT) Received: from mail-vc0-f171.google.com (mail-vc0-f171.google.com [209.85.220.171]) by mx.google.com with ESMTPS id kf20si8211232vdb.24.2014.08.12.06.33.40 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 12 Aug 2014 06:33:40 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.171 as permitted sender) client-ip=209.85.220.171; Received: by mail-vc0-f171.google.com with SMTP id hq11so13289245vcb.30 for ; Tue, 12 Aug 2014 06:33:40 -0700 (PDT) X-Received: by 10.220.118.136 with SMTP id v8mr803653vcq.50.1407850420313; Tue, 12 Aug 2014 06:33:40 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.221.37.5 with SMTP id tc5csp249180vcb; Tue, 12 Aug 2014 06:33:39 -0700 (PDT) X-Received: by 10.180.93.104 with SMTP id ct8mr32402889wib.30.1407850418971; Tue, 12 Aug 2014 06:33:38 -0700 (PDT) Received: from mail-wi0-f173.google.com (mail-wi0-f173.google.com [209.85.212.173]) by mx.google.com with ESMTPS id v11si30848401wjr.176.2014.08.12.06.33.38 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 12 Aug 2014 06:33:38 -0700 (PDT) Received-SPF: pass (google.com: domain of ard.biesheuvel@linaro.org designates 209.85.212.173 as permitted sender) client-ip=209.85.212.173; Received: by mail-wi0-f173.google.com with SMTP id f8so5859089wiw.6 for ; Tue, 12 Aug 2014 06:33:38 -0700 (PDT) X-Received: by 10.180.24.225 with SMTP id x1mr32272794wif.14.1407850418421; Tue, 12 Aug 2014 06:33:38 -0700 (PDT) Received: from ards-macbook-pro.local ([109.227.30.102]) by mx.google.com with ESMTPSA id kw1sm9347231wjb.19.2014.08.12.06.33.36 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 12 Aug 2014 06:33:37 -0700 (PDT) From: Ard Biesheuvel To: matthew.garrett@nebula.com, pjones@redhat.com Cc: leif.lindholm@linaro.org, ilias.biris@linaro.org, patches@linaro.org, Ard Biesheuvel Subject: [PATCH 1/5] CryptLib: undefine va_arg and friends before redefining them Date: Tue, 12 Aug 2014 15:33:18 +0200 Message-Id: <1407850402-11193-2-git-send-email-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1407850402-11193-1-git-send-email-ard.biesheuvel@linaro.org> References: <1407850402-11193-1-git-send-email-ard.biesheuvel@linaro.org> X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: ard.biesheuvel@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.171 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Upstream GNU-EFI contains changes to efistdarg.h resulting in the va_start, va_arg and va_end macros to be #defined unconditionally. Make sure we #undef them before overriding the definitions. Signed-off-by: Ard Biesheuvel --- Cryptlib/Include/OpenSslSupport.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Cryptlib/Include/OpenSslSupport.h b/Cryptlib/Include/OpenSslSupport.h index 5a2745d7ac4a..84c819a20a3b 100644 --- a/Cryptlib/Include/OpenSslSupport.h +++ b/Cryptlib/Include/OpenSslSupport.h @@ -35,6 +35,15 @@ typedef VOID *FILE; // Map all va_xxxx elements to VA_xxx defined in MdePkg/Include/Base.h // #if !defined(__CC_ARM) // if va_list is not already defined + +/* + * These are now unconditionally #defined by GNU_EFI's efistdarg.h, + * so we should #undef them here before providing a new definition. + */ +#undef va_arg +#undef va_start +#undef va_end + #define va_list VA_LIST #define va_arg VA_ARG #define va_start VA_START