Re: [Nagios-devel] [patch] NRPE for big endian archs

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
Guest

Re: [Nagios-devel] [patch] NRPE for big endian archs

Post by Guest »

Klaus Kuehnhammer wrote:
> Hi,
>
> I've been asked to make the NRPE daemon work on a custom Coldfire board
> (arch m68k), w/Nagios querying the daemon from a linux box.
>
> I ran into some issues with the way CRC32 sums are calculated, as well as
> the packet struct getting differently aligned on the host and board
> (causing the buffer start to be off by 2 bytes depending on where the
> word-align paddings goes and/or the compilers disagreeing on the struct
> size).
>
> The attached patches solve both problems for me, but break compatibility to
> other builds on account of the changed packet struct. I can't think of a
> quick way to avoid that at the moment.
>

Use "__attribute__((__packed__))" in the struct declaration and everywhere
that struct is included in other structs.

--
Andreas Ericsson [email protected]
OP5 AB www.op5.se
Tel: +46 8-230225 Fax: +46 8-230231





This post was automatically imported from historical nagios-devel mailing list archives
Original poster: [email protected]
Locked