Change the defines NLMSG_ALIGNTO and NLA_ALIGNTO defines to 0.

Change the macros NLA_ALIGN and NLMSG_ALIGN to SIZE.

Signed-off-by: Alin Gabriel Serdean <aserd...@cloudbasesolutions.com>
---
 lib/netlink-protocol.h | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/lib/netlink-protocol.h b/lib/netlink-protocol.h
index 88b7abf..ea1b872 100644
--- a/lib/netlink-protocol.h
+++ b/lib/netlink-protocol.h
@@ -68,8 +68,13 @@ struct nlmsghdr {
 };
 BUILD_ASSERT_DECL(sizeof(struct nlmsghdr) == 16);
 
+#ifndef _WIN32
 #define NLMSG_ALIGNTO 4
 #define NLMSG_ALIGN(SIZE) ROUND_UP(SIZE, NLMSG_ALIGNTO)
+#else
+#define NLMSG_ALIGNTO 0
+#define NLMSG_ALIGN(SIZE) SIZE
+#endif
 #define NLMSG_HDRLEN ((int) NLMSG_ALIGN(sizeof(struct nlmsghdr)))
 
 struct nlmsgerr
@@ -94,8 +99,13 @@ struct nlattr {
 };
 BUILD_ASSERT_DECL(sizeof(struct nlattr) == 4);
 
+#ifndef _WIN32
 #define NLA_ALIGNTO 4
 #define NLA_ALIGN(SIZE) ROUND_UP(SIZE, NLA_ALIGNTO)
+#else
+#define NLA_ALIGNTO 0
+#define NLA_ALIGN(SIZE) SIZE
+#endif
 #define NLA_HDRLEN ((int) NLA_ALIGN(sizeof(struct nlattr)))
 
 #define GENL_MIN_ID     NLMSG_MIN_TYPE
-- 
1.9.0.msysgit.0

_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to