mirror of
https://github.com/zeromq/libzmq.git
synced 2025-03-21 19:23:51 +00:00
Fix alignment problem with zmq_msg_t.
Problem occurs on SPARC and ARM CPUs. This commit is a backport of
d9fb1d36ff
(from
libzmq), first reported in https://github.com/zeromq/libzmq/issues/1325.
This commit is contained in:
parent
4732951d05
commit
2b7b903a85
@ -205,7 +205,10 @@ ZMQ_EXPORT int zmq_ctx_destroy (void *context);
|
||||
/* 0MQ message definition. */
|
||||
/******************************************************************************/
|
||||
|
||||
typedef struct zmq_msg_t {unsigned char _ [64];} zmq_msg_t;
|
||||
/* union here ensures correct alignment on architectures that require it, e.g.
|
||||
* SPARC and ARM
|
||||
*/
|
||||
typedef union zmq_msg_t { unsigned char _ [64]; void *p; } zmq_msg_t;
|
||||
|
||||
typedef void (zmq_free_fn) (void *data, void *hint);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user