From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: [PATCH 3/3] mbuf_offload: fix header for C++ Date: Fri, 5 Feb 2016 18:06:09 +0100 Message-ID: <1454691969-25734-4-git-send-email-thomas.monjalon@6wind.com> References: <1454691969-25734-1-git-send-email-thomas.monjalon@6wind.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: dev@dpdk.org To: pablo.de.lara.guarch@intel.com, declan.doherty@intel.com, remy.horton@intel.com Return-path: Received: from mail-wm0-f46.google.com (mail-wm0-f46.google.com [74.125.82.46]) by dpdk.org (Postfix) with ESMTP id E13EAC342 for ; Fri, 5 Feb 2016 18:08:17 +0100 (CET) Received: by mail-wm0-f46.google.com with SMTP id g62so36266570wme.0 for ; Fri, 05 Feb 2016 09:08:17 -0800 (PST) In-Reply-To: <1454691969-25734-1-git-send-email-thomas.monjalon@6wind.com> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" When built in a C++ application, the include fails for 2 reasons: rte_mbuf_offload.h:128:24: error: invalid conversion from =E2=80=98void*=E2=80=99 to =E2=80=98rte_pktmbuf_o= ffload_pool_private*=E2=80=99 [-fpermissive] rte_mempool_get_priv(mpool); ^ rte_mbuf_offload.h:304:1: error: expected declaration before =E2=80=98}=E2= =80=99 token Fixes: 78c8709b5ddb ("mbuf_offload: introduce library to attach offloads = to mbuf") Signed-off-by: Thomas Monjalon --- lib/librte_mbuf_offload/rte_mbuf_offload.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/librte_mbuf_offload/rte_mbuf_offload.h b/lib/librte_mbuf= _offload/rte_mbuf_offload.h index 4345f06..a0e990d 100644 --- a/lib/librte_mbuf_offload/rte_mbuf_offload.h +++ b/lib/librte_mbuf_offload/rte_mbuf_offload.h @@ -59,6 +59,9 @@ #include #include =20 +#ifdef __cplusplus +extern "C" { +#endif =20 /** packet mbuf offload operation types */ enum rte_mbuf_ol_op_type { @@ -125,7 +128,7 @@ static inline uint16_t __rte_pktmbuf_offload_priv_size(struct rte_mempool *mpool) { struct rte_pktmbuf_offload_pool_private *priv =3D - rte_mempool_get_priv(mpool); + (rte_pktmbuf_offload_pool_private *)rte_mempool_get_priv(mpool); =20 return priv->offload_priv_size; } --=20 2.7.0