From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 168CAA00BE; Thu, 10 Feb 2022 15:05:05 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1529A42743; Thu, 10 Feb 2022 15:04:40 +0100 (CET) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by mails.dpdk.org (Postfix) with ESMTP id EB7B442732; Thu, 10 Feb 2022 15:04:34 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1644501875; x=1676037875; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=veIxnvD4HcP71geTR9XiNe9UbAQ5n7+OKC29V7i55zI=; b=ViGwBfVolDc0j5GXIQ8cC6cDzItWyDoHDz6qDpvPVWM8clX6jMgchYtC lpj2hAvaE0yy8jU7aN0nGLv1uxTbvkm5DVC19a6SmQ+pdnZJ034o9q7E4 Hr393UYovb1uTB7A6jR1dcuIKPQO3OlWLBtzIT6LEL1GIYA+FAKucjJUo hYPwePL7nefYIIkKIk9SWYp31YNjwr3iGWhJkdz3HayIDxDbhsfZ2pvgA VijkgiIYYbKR1LptfUVCRy+sUuk7aNdDNJ0CNJ14H6cy0+oDAKkiXpWXT fiXbZaAuzUZ3/RZ8Tfc8BAjRJZ3uL/j/hFgb08B75HNeI8EWVgw9QIvbW g==; X-IronPort-AV: E=McAfee;i="6200,9189,10253"; a="312781116" X-IronPort-AV: E=Sophos;i="5.88,358,1635231600"; d="scan'208";a="312781116" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Feb 2022 06:04:34 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.88,358,1635231600"; d="scan'208";a="585964285" Received: from silpixa00399126.ir.intel.com ([10.237.223.162]) by fmsmga008.fm.intel.com with ESMTP; 10 Feb 2022 06:04:33 -0800 From: Bruce Richardson To: dev@dpdk.org Cc: Bruce Richardson , adrien.mazarguil@6wind.com, stable@dpdk.org, Yuanhan Liu , Maxime Coquelin Subject: [PATCH v3 6/7] vhost: fix incompatible header includes for C++ Date: Thu, 10 Feb 2022 14:03:54 +0000 Message-Id: <20220210140355.586399-7-bruce.richardson@intel.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220210140355.586399-1-bruce.richardson@intel.com> References: <20220204174209.440207-1-bruce.richardson@intel.com> <20220210140355.586399-1-bruce.richardson@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org The virtio kernel header includes are already noted as being incompatible with C++. We can ensure that the header is safe for inclusion in C++ code by not including those headers during C++ builds. While not ideal, this does ensure that all DPDK headers can be included in C++ code without errors. Fixes: f8904d563691 ("vhost: fix header for strict compilation flags") Cc: adrien.mazarguil@6wind.com Cc: stable@dpdk.org Signed-off-by: Bruce Richardson --- lib/vhost/rte_vhost.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/vhost/rte_vhost.h b/lib/vhost/rte_vhost.h index b454c05868..2acb31df2d 100644 --- a/lib/vhost/rte_vhost.h +++ b/lib/vhost/rte_vhost.h @@ -21,10 +21,12 @@ extern "C" { #endif +#ifndef __cplusplus /* These are not C++-aware. */ #include #include #include +#endif #define RTE_VHOST_USER_CLIENT (1ULL << 0) #define RTE_VHOST_USER_NO_RECONNECT (1ULL << 1) -- 2.32.0