Received: by 2002:a05:6520:4211:b029:f4:110d:56bc with SMTP id o17csp2108159lkv; Thu, 20 May 2021 03:36:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxtLmZ47M0OtXoFy8dTZvNTvLMPweIVPEVvKaxtKcpNZ+qQdxPFcPPymdvtIV/3JTBOeZp+ X-Received: by 2002:a5e:974d:: with SMTP id h13mr4531318ioq.150.1621506969020; Thu, 20 May 2021 03:36:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621506969; cv=none; d=google.com; s=arc-20160816; b=nNZnxqVvIFcxwgKtJm0FhzJHYGNWLmqdf0Gf81uqHlG96uBK3oe+HJ/EV5t4xs5pn8 177gWiQMpwfmOfjeYTcCrJnYSQ8UITQZdDwV17LMSrHcCsU4UCZXMVatcfMiLA0GXkMY Fk/7jy6XtarYDNurnaD9mHbo+hCjuSkCGCnPtYlnGFdqA+sBLUzmqTQdPgEcsI3O1KyS nxSxWkGMl/08KdQcGnMBMMo6/PiDs/vjTIjd574qIyu3Yia0YL3mAdwS4ExUDlHUiBpm TAgoTqzYwyHInqGvIqe/XiA05Hf7TrkJ957lNyI9oNPLW5cZCBmSZNoFXG2AYYyhSpV0 eZoQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=5FoJuEoe+W5m63qOiN1DCz38114TNIKQkP8TQs2E9ps=; b=GN3G0R3NW6tnYrm+oCXdjQnrdAhOb0plUsTrLYB5YjVHPVm2+9eI1s4Lm7g1BzduA7 lTpG5qQtDTsJY8iklxR8jwDatkCDflqdx0nK6tmrstOsRykwdfZb2HJYEyxwt8iRTLBm oahnARHLCFfukoaMkqq8l7iUJeoF7nJf39dATz8wNHeJQlvuZLkp4F0orLixxwftm1U9 4YBmfnWKutKDU62/fEV5/3rsX3Vho4wWPNhjCQTQUIzIlv5SiJiG3FdYIROearjwARrL LeWi3XZvbjXn4Ad5UeyUMaZgQm+0vRS7bOIV9MidNdeEwLf8co3rUtZEY+OZjI1QGimV iGWQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=kpQe3BzK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b11si2705441ilj.61.2021.05.20.03.35.52; Thu, 20 May 2021 03:36:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=kpQe3BzK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237602AbhETKfC (ORCPT + 99 others); Thu, 20 May 2021 06:35:02 -0400 Received: from mail.kernel.org ([198.145.29.99]:50934 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235912AbhETKVc (ORCPT ); Thu, 20 May 2021 06:21:32 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 6A6A3611BD; Thu, 20 May 2021 09:48:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1621504080; bh=nM82XFwB+Hv0Rbe30sfFpEmwyRJEFZjJt83JZ6zhF7s=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=kpQe3BzKvYEHi93vM/bGZJM+b+Y+kdct3T4qahhKdj1WyjRO+lOjT7yZ81xPLbkkU ul8V2fjqgbuGQVTbWA5qJmb6nieK8MLWf05py5VNyZ3+tUa/Ca43IEt9sl9/b1MSRO Df72SVTl/0jNC1uGbIu2JcUHBYC6EkIOsErJsAN8= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Rosen Penev , Tony Ambardar , Michael Ellerman Subject: [PATCH 4.14 083/323] powerpc: fix EDEADLOCK redefinition error in uapi/asm/errno.h Date: Thu, 20 May 2021 11:19:35 +0200 Message-Id: <20210520092122.933422194@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210520092120.115153432@linuxfoundation.org> References: <20210520092120.115153432@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Tony Ambardar commit 7de21e679e6a789f3729e8402bc440b623a28eae upstream. A few archs like powerpc have different errno.h values for macros EDEADLOCK and EDEADLK. In code including both libc and linux versions of errno.h, this can result in multiple definitions of EDEADLOCK in the include chain. Definitions to the same value (e.g. seen with mips) do not raise warnings, but on powerpc there are redefinitions changing the value, which raise warnings and errors (if using "-Werror"). Guard against these redefinitions to avoid build errors like the following, first seen cross-compiling libbpf v5.8.9 for powerpc using GCC 8.4.0 with musl 1.1.24: In file included from ../../arch/powerpc/include/uapi/asm/errno.h:5, from ../../include/linux/err.h:8, from libbpf.c:29: ../../include/uapi/asm-generic/errno.h:40: error: "EDEADLOCK" redefined [-Werror] #define EDEADLOCK EDEADLK In file included from toolchain-powerpc_8540_gcc-8.4.0_musl/include/errno.h:10, from libbpf.c:26: toolchain-powerpc_8540_gcc-8.4.0_musl/include/bits/errno.h:58: note: this is the location of the previous definition #define EDEADLOCK 58 cc1: all warnings being treated as errors Cc: Stable Reported-by: Rosen Penev Signed-off-by: Tony Ambardar Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200917135437.1238787-1-Tony.Ambardar@gmail.com Signed-off-by: Greg Kroah-Hartman --- arch/powerpc/include/uapi/asm/errno.h | 1 + 1 file changed, 1 insertion(+) --- a/arch/powerpc/include/uapi/asm/errno.h +++ b/arch/powerpc/include/uapi/asm/errno.h @@ -2,6 +2,7 @@ #ifndef _ASM_POWERPC_ERRNO_H #define _ASM_POWERPC_ERRNO_H +#undef EDEADLOCK #include #undef EDEADLOCK