OVS_TYPEOF macro doesn’t return the type of object for non __GNUC__ platforms. Updating it for _WIN32 platforms when used from C++ code.
Signed-off-by: Archana Holla <[email protected]> --- include/openvswitch/util.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/openvswitch/util.h b/include/openvswitch/util.h index 9189e64..af7d1b0 100644 --- a/include/openvswitch/util.h +++ b/include/openvswitch/util.h @@ -86,8 +86,12 @@ OVS_NO_RETURN void ovs_assert_failure(const char *, const char *, const char *); #ifdef __GNUC__ #define OVS_TYPEOF(OBJECT) typeof(OBJECT) #else +#if defined (__cplusplus) && defined(_WIN32) +#define OVS_TYPEOF(OBJECT) decltype(OBJECT) +#else #define OVS_TYPEOF(OBJECT) void * #endif +#endif /* Given OBJECT of type pointer-to-structure, expands to the offset of MEMBER * within an instance of the structure. -- 2.7.4 _______________________________________________ dev mailing list [email protected] https://mail.openvswitch.org/mailman/listinfo/ovs-dev
