Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp610692pxj; Thu, 20 May 2021 17:48:49 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzWaer8ja4vQf7dA09nDv0a+dyTqYxHMQutrHOI5MpLtPfehI0BQrG7ZMJCjmx2IMykykQI X-Received: by 2002:a02:c85b:: with SMTP id r27mr284603jao.43.1621558129257; Thu, 20 May 2021 17:48:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621558129; cv=none; d=google.com; s=arc-20160816; b=Y/aWvW/rVRfx+H4iPNUw1ufbINqGjTbWU8RUlgPSZFhi4U0e/gTbwnd0oN9iwu1yOk wFo1dJhHdKndrT+3q9ugJ4uxhVNkG02LvuL968AgiV+UrKUZtpge4kYQ2D6ZLAFm+eip 58hYeTwlfSRi/n2ozVGAdwwfX9iyU2nJ4wOuZuuwoZQ0vtUoU0AE6NVKdn7+yA+0V2TP 61+YIe4gsCW7aNePTx8CmxRJC74kH1uLEp8ZvufOEJBo30QCw1+Gj4ZmZfPXX7m833JU z2K1NJ/atbCbLd+Jkg0g0nozYq+rMhOy4VqtfOtUHQSwsRS1VDYpCjqyw/GXZmW74AYg fFHw== 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=XKJxw5aLbUJdDk4gnXo6l2zrjyZY9i7uhx1KKItVtRE=; b=EW8yv2N6woEN9XoFIM3AIYo+BJvgz/EPNHZroC4k7VcjEk8JXpHl4kiVZLFcZ+ASK4 ju0eCOBVRP6iGBZpiyV08+oD8XNRYSkxoyRg2sy8sLRJw+/GTczhy3zbmNMDbkR7EwcX PriPpoWlM1iFc1pIcDE7FjjTPf/wgW4VbOj4ypUL4SLMFDbypevQBW+u9mDi7ad4Sotw wO+jZGxe9dfFiuJFlVk74VzoEh3THd9ika9Pl75zuTnPOIQOB8Azcc8Ghp3qeijPqen4 LI41e5YXkP1Nzt/GY/yivt88r6i+wCTQVumZ8YT5aZ55KoRIR5A3U4ieJoGvg2rbUJrW ksBg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=oAzXIoYv; 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 s4si4672393ilv.33.2021.05.20.17.48.36; Thu, 20 May 2021 17:48:49 -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=oAzXIoYv; 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 S241500AbhETLbZ (ORCPT + 99 others); Thu, 20 May 2021 07:31:25 -0400 Received: from mail.kernel.org ([198.145.29.99]:48156 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239529AbhETLLF (ORCPT ); Thu, 20 May 2021 07:11:05 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 3600861D49; Thu, 20 May 2021 10:07:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1621505238; bh=K414adILnCwidcvQb3gPQD1BmTcpxvdsNwWyokDk6ak=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=oAzXIoYvzbINm1kPjBXqIXnNyCcqHzoQbkmW+lIrg1vobX0+YtXlYiD0wupd6y5ag iZL9VxCL4DcmlKgvSuQlCTjgK/CZcUjhVkdP1LlOEnEo6JgvHDjOQeJMo5MqTT6IGZ qbw1alOZYIrybIkW+ud3/r3F3HLTapONpBteJfOc= 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.4 045/190] powerpc: fix EDEADLOCK redefinition error in uapi/asm/errno.h Date: Thu, 20 May 2021 11:21:49 +0200 Message-Id: <20210520092103.666634310@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210520092102.149300807@linuxfoundation.org> References: <20210520092102.149300807@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 @@ -1,6 +1,7 @@ #ifndef _ASM_POWERPC_ERRNO_H #define _ASM_POWERPC_ERRNO_H +#undef EDEADLOCK #include #undef EDEADLOCK