From patchwork Sun Mar 11 09:20:29 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sven Eckelmann X-Patchwork-Id: 17294 X-Patchwork-Delegate: sw@simonwunderlich.de Return-Path: X-Original-To: patchwork@open-mesh.org Delivered-To: patchwork@open-mesh.org Received: from open-mesh.org (localhost [IPv6:::1]) by open-mesh.org (Postfix) with ESMTP id 7661681301; Sun, 11 Mar 2018 10:20:39 +0100 (CET) Authentication-Results: open-mesh.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=narfation.org header.i=@narfation.org header.b="PWqm9o8T"; dkim-atps=neutral Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=2001:4d88:2000:7::2; helo=v3-1039.vlinux.de; envelope-from=sven@narfation.org; receiver= Received: from v3-1039.vlinux.de (narfation.org [IPv6:2001:4d88:2000:7::2]) by open-mesh.org (Postfix) with ESMTPS id 174A1802ED for ; Sun, 11 Mar 2018 10:20:35 +0100 (CET) Received: from sven-desktop.home.narfation.org (unknown [IPv6:2a00:c1a0:c0b7:7b00:6a17:29ff:fee0:e6ec]) by v3-1039.vlinux.de (Postfix) with ESMTPSA id 5E414110128; Sun, 11 Mar 2018 10:20:34 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=narfation.org; s=20121; t=1520760034; bh=EtzQviEY395NoLF++4DEb2XeqXzj8x+/67zs5rfb840=; h=From:To:Cc:Subject:Date:From; b=PWqm9o8T3Dj+AgX+mH0T3a4yHBZ/YNmJrgj1Za3TFby8W4/Qs9sCyL3dPOEilC2so KIqMWPAfc++5JesFroKG+Qe/woL/iLqHwWIviYPKkE6syID78NWKOmakU59ip6RI/V O2Btkt23wyDpcwdOsQYWKM0B/IhU/oU3uSdUA8mg= From: Sven Eckelmann To: b.a.t.m.a.n@lists.open-mesh.org Date: Sun, 11 Mar 2018 10:20:29 +0100 Message-Id: <20180311092029.15236-1-sven@narfation.org> X-Mailer: git-send-email 2.16.1 Subject: [B.A.T.M.A.N.] [PATCH maint] batman-adv: Only provide (READ|WRITE)_ONCE when undefined X-BeenThere: b.a.t.m.a.n@lists.open-mesh.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: The list for a Better Approach To Mobile Ad-hoc Networking List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: The list for a Better Approach To Mobile Ad-hoc Networking Cc: Ralf Jung Errors-To: b.a.t.m.a.n-bounces@lists.open-mesh.org Sender: "B.A.T.M.A.N" The Debian Jessie 3.16.x kernels (3.16.36-1 and later) modified the the kernel sources to already provide the READ_ONCE and WRITE_ONCE kernel macros. The batman-adv compat helper defines will conflict on such kernels and thus prevent the compilation against these downstream kernels. Reported-by: Ralf Jung Signed-off-by: Sven Eckelmann --- Cc: Ralf Jung See https://www.open-mesh.org/issues/350 --- compat-include/linux/compiler.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/compat-include/linux/compiler.h b/compat-include/linux/compiler.h index 62b6a2f9..45cd49fa 100644 --- a/compat-include/linux/compiler.h +++ b/compat-include/linux/compiler.h @@ -26,11 +26,15 @@ #if LINUX_VERSION_CODE < KERNEL_VERSION(3, 19, 0) +#ifndef READ_ONCE #define READ_ONCE(x) ACCESS_ONCE(x) +#endif +#ifndef WRITE_ONCE #define WRITE_ONCE(x, val) ({ \ ACCESS_ONCE(x) = (val); \ }) +#endif #endif /* < KERNEL_VERSION(3, 19, 0) */