[Openais] [PATCH] Endian fixes
pcaulfie at redhat.com
Fri Apr 28 11:07:59 PDT 2006
Patrick Caulfield wrote:
> Attached is a patch that (seems to) allow interoperability between bin &
> little-endian machines.
> I've briefly tested it between and macmini (running OS/X) and and an
> Intel Linux box. It probably needs some eyes and more testing before
> being committed.
> Included are a couple of #includes needed make it compile on Tiger.
> Apologies in advance for using alloca() - if people don't like that I'll
> change them.
> + struct req_exec_clm_nodejoin *node_join = msg;
> + node_join->clusterNode.nodeId = swab32(node_join->clusterNode.nodeId);
> + node_join->clusterNode.nodeAddress.family = swab32(node_join->clusterNode.nodeAddress.family);
> + node_join->clusterNode.nodeAddress.length = swab16(node_join->clusterNode.nodeAddress.length);
> + node_join->clusterNode.initialViewNumber = swab64(node_join->clusterNode.initialViewNumber);
> +// SaTimeT bootTimestamp; PJC TODO
Oops. A hazard of working on two separate machines. I do actually have
the correct swab(64) in here...
More information about the Openais