From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <thomas@monjalon.net>
Received: from out2-smtp.messagingengine.com (out2-smtp.messagingengine.com
 [66.111.4.26]) by dpdk.org (Postfix) with ESMTP id ED6AA1B533;
 Wed, 20 Jun 2018 16:09:35 +0200 (CEST)
Received: from compute1.internal (compute1.nyi.internal [10.202.2.41])
 by mailout.nyi.internal (Postfix) with ESMTP id DFA8421A99;
 Wed, 20 Jun 2018 10:09:34 -0400 (EDT)
Received: from mailfrontend1 ([10.202.2.162])
 by compute1.internal (MEProxy); Wed, 20 Jun 2018 10:09:34 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h=
 cc:date:from:message-id:subject:to:x-me-sender:x-me-sender
 :x-sasl-enc; s=mesmtp; bh=XhqhA6tcrHM+EHX32FTaosjew+rWWINfQZ/kFQ
 +2wF4=; b=rG0/EDh75CK6P97+QkLpvFSShtoEy6nW2b4R9eRvC4xnNmgjghTNCG
 t5N4MUfda4Tq0yg9U9HTQYAqL88Ys0HdD2R5OhpnXzAxrAtMb8eY2AKv8MIuaTEx
 qIF6sx8GE3FZCbilbMSmfM7DlFIzUmw66XiMuT11iWdbJrUms4QxY=
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 messagingengine.com; h=cc:date:from:message-id:subject:to
 :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=XhqhA6tcrHM+EHX32
 FTaosjew+rWWINfQZ/kFQ+2wF4=; b=GyrnonXalZfUoCnl8dL3t0zEi9Uatdi/Z
 CJjycZhy/HizfLbM0yUdvmzJSGZkJII5iUcNfjoNwVkMMiXVQwy3gRO3cgFRWECY
 0dSTPeI1cHn4/BLCI4LJpFtCshbq4P+iEukLxt1jVs2IjgyvBTDtPFj1xTmhuCK0
 tq2SpyiCmYlh72HeTSOAotIsyrFmJb/XQddXLoZJbnu+dxaS0oWY39KAcrVu/AxP
 p0ceWWw+GMlC+NdAFSUMCNql7cBdK2yDsd1qsz/8lmpJH4iz4DsgmIqAy3OugE7k
 oIwC5v6VjtkULpaeDNpruykA7OAdJ87ntt5/k+VUjab0sS4AMGxnQ==
X-ME-Proxy: <xmx:HmAqW3a3XHY36yfoqnUFA0YfRy88GYGNjJV8cMqcDznhZXCVG6xEqw>
 <xmx:HmAqW6VoQPWMGllm4N6KuyVzQtpk9Qba6WDLXM3BSlKHolqWoiY9eg>
 <xmx:HmAqWycMSiG9_47kHdbqHkoPMkJwVyzlfpA0bmoycaEVc62gHtsK4w>
 <xmx:HmAqW3NHQivSe3iF_gyCpieg3LRZNI9AnqT4PImvtcmvH4sG9Qip3g>
 <xmx:HmAqW6IQNl6zchOYXPgRWzdyXjCj-6hWscX_bR2iiHpozCwZI_l20g>
 <xmx:HmAqW8hMYA5JKrTzBTeTELjE9wRt-hk3pbfH2iFHpsVc1M8GMda19w>
X-ME-Sender: <xms:HmAqWzCsPTOJsQGB4nnewcMwvBi0SC6LZAfgmUPLMwZoAyHIikMB0g>
Received: from xps.monjalon.net (184.203.134.77.rev.sfr.net [77.134.203.184])
 by mail.messagingengine.com (Postfix) with ESMTPA id D9D0AE4AB9;
 Wed, 20 Jun 2018 10:09:33 -0400 (EDT)
From: Thomas Monjalon <thomas@monjalon.net>
To: dev@dpdk.org
Cc: stable@dpdk.org, geoff.thorpe@nxp.com, hemant.agrawal@nxp.com,
 shreyansh.jain@nxp.com
Date: Wed, 20 Jun 2018 16:09:30 +0200
Message-Id: <20180620140930.31002-1-thomas@monjalon.net>
X-Mailer: git-send-email 2.17.1
Subject: [dpdk-stable] [PATCH] bus/dpaa: fix build
X-BeenThere: stable@dpdk.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: patches for DPDK stable branches <stable.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/stable>,
 <mailto:stable-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/stable/>
List-Post: <mailto:stable@dpdk.org>
List-Help: <mailto:stable-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/stable>,
 <mailto:stable-request@dpdk.org?subject=subscribe>
X-List-Received-Date: Wed, 20 Jun 2018 14:09:36 -0000

The DPAA bus driver is defining some macros without prefix.
So it can conflict with other libraries like libbsd:

	drivers/bus/dpaa/include/compat.h:53:
		error: "__packed" redefined
	/usr/include/bsd/sys/cdefs.h:120:
		note: this is the location of the previous definition

Fixes: 39f373cf015a ("bus/dpaa: add compatibility and helper macros")
Cc: stable@dpdk.org
Cc: geoff.thorpe@nxp.com
Cc: hemant.agrawal@nxp.com
Cc: shreyansh.jain@nxp.com

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
---
 drivers/bus/dpaa/include/compat.h | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/bus/dpaa/include/compat.h b/drivers/bus/dpaa/include/compat.h
index e4b570214..92241d231 100644
--- a/drivers/bus/dpaa/include/compat.h
+++ b/drivers/bus/dpaa/include/compat.h
@@ -48,9 +48,15 @@
  */
 
 /* Required compiler attributes */
+#ifndef __maybe_unused
 #define __maybe_unused	__rte_unused
+#endif
+#ifndef __always_unused
 #define __always_unused	__rte_unused
+#endif
+#ifndef __packed
 #define __packed	__rte_packed
+#endif
 #define noinline	__attribute__((noinline))
 
 #define L1_CACHE_BYTES 64
-- 
2.17.1