]> git.ipfire.org Git - thirdparty/open-vm-tools.git/commitdiff
vm_atomic needs to have an internal extern "C".
authorOliver Kurth <okurth@vmware.com>
Fri, 15 Sep 2017 18:23:12 +0000 (11:23 -0700)
committerOliver Kurth <okurth@vmware.com>
Fri, 15 Sep 2017 18:23:12 +0000 (11:23 -0700)
open-vm-tools/lib/include/vm_atomic.h

index 7c42825d0f5ea6cf112b45d046a4a3305100fc8b..cbb1aa4c7c5f99f181a04c2da8d4f74c90b0f41f 100644 (file)
@@ -32,7 +32,6 @@
 #define _ATOMIC_H_
 
 #define INCLUDE_ALLOW_USERLEVEL
-
 #define INCLUDE_ALLOW_MODULE
 #define INCLUDE_ALLOW_VMMON
 #define INCLUDE_ALLOW_VMKDRIVERS
 #include "vm_basic_types.h"
 #include "vm_assert.h"
 
+#if defined(__cplusplus)
+extern "C" {
+#endif
+
 /*
  * In the Atomic_* definitions below, memory ordering and atomicity are somewhat
  * conflated in an inconsistent manner. First, we have Atomic_{Read,Write},
@@ -3776,4 +3779,8 @@ Atomic_MFence(void)
 #undef ATOMIC_COMPILER_BARRIER
 #endif /* ATOMIC_COMPILER_BARRIER */
 
+#if defined(__cplusplus)
+}  // extern "C"
+#endif
+
 #endif // ifndef _ATOMIC_H_