From 57cb34f12324df4c31ff2d804a6e0f26ae3a4ed8 Mon Sep 17 00:00:00 2001 From: Alexey Melnichuk Date: Tue, 13 Jan 2015 18:16:27 +0400 Subject: [PATCH] Fix. Use C++03 compatible way to align struct. (Build on MSVC) #1299 break compiling with MSVC 2010. --- src/command.hpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/command.hpp b/src/command.hpp index e2801094..a6a9e189 100644 --- a/src/command.hpp +++ b/src/command.hpp @@ -59,7 +59,8 @@ namespace zmq done } type; - union { + union args_t + { // Sent to I/O thread to let it know that it should // terminate itself. @@ -147,7 +148,7 @@ namespace zmq } args; - enum { pad_size = 64 - (sizeof(destination) + sizeof(args)) }; + enum { pad_size = 64 - (sizeof(zmq::object_t*) + sizeof(args_t) + sizeof(type_t)) }; unsigned char unused[ pad_size ]; };