[dpdk-dev] vfio: fix headers to include C++ support

Message ID f945206500b96cbe739eedcf57cd1d80b1ceb626.1519316415.git.anatoly.burakov@intel.com (mailing list archive)
State Accepted, archived
Headers

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK

Commit Message

Anatoly Burakov Feb. 22, 2018, 5:13 p.m. UTC
  Fixes: 279b581c897d ("vfio: expose functions")
Cc: gaetan.rivet@6wind.com
Cc: stable@dpdk.org

Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
---
 lib/librte_eal/common/include/rte_vfio.h | 8 ++++++++
 1 file changed, 8 insertions(+)
  

Comments

Thomas Monjalon March 21, 2018, 5:49 p.m. UTC | #1
22/02/2018 18:13, Anatoly Burakov:
> Fixes: 279b581c897d ("vfio: expose functions")
> Cc: gaetan.rivet@6wind.com
> Cc: stable@dpdk.org
> 
> Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>

Applied, thanks
  

Patch

diff --git a/lib/librte_eal/common/include/rte_vfio.h b/lib/librte_eal/common/include/rte_vfio.h
index e981a62..249095e 100644
--- a/lib/librte_eal/common/include/rte_vfio.h
+++ b/lib/librte_eal/common/include/rte_vfio.h
@@ -28,6 +28,10 @@ 
 #define VFIO_NOIOMMU_MODE      \
 	"/sys/module/vfio/parameters/enable_unsafe_noiommu_mode"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /**
  * Setup vfio_cfg for the device identified by its address.
  * It discovers the configured I/O MMU groups or sets a new one for the device.
@@ -123,6 +127,10 @@  int rte_vfio_noiommu_is_enabled(void);
 int
 rte_vfio_clear_group(int vfio_group_fd);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* VFIO_PRESENT */
 
 #endif /* _RTE_VFIO_H_ */