From: Bruce Richardson Date: Thu, 10 Feb 2022 15:42:38 +0000 (+0000) Subject: vhost: fix C++ include X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=1d1126ad436e8c7c015fb3f67ad3af05c3b397d5;p=dpdk.git vhost: fix C++ include 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: stable@dpdk.org Signed-off-by: Bruce Richardson --- 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)