[collectd] ntohll and htonll patch for OpenSolaris

Amit Gupta amit.gupta221 at gmail.com
Wed Feb 24 07:12:36 CET 2010

Any comments on the patch?

On 2/18/10, Amit Gupta <amit.gupta221 at gmail.com> wrote:
> Hopefully this is the last patch for the collectd integration into
> OpenSolaris :). This patch is about avoiding the redeclaration of ntohll and
> htonll functions if the underlying platform provide these functions
> (OpenSolaris has ntohll and htonll macros/functions defined in the
> /usr/include/sys/byteorder.h).
> I discovered this when I got the following compilation errors while
> building collectd on OpenSolaris *sparc*:
> "common.c", line 662: syntax error before or at: unsigned
> "common.c", line 662: syntax error before or at: )
> "common.c", line 671: syntax error before or at: unsigned
> "common.c", line 671: syntax error before or at: )
> cc: acomp failed for common.c
> This compilation error is due to the ntohll and htonll *macros *defined in
> byteorder.h for BIG_ENDIAN and thus, the preprocessor replace the functions
> ntohll and htonll in common.c with the value of the respective macros. For
> LITTLE_ENDIAN, the ntohll and htonll functions are defined which are doing
> exactly the same thing as being done in common.c.
> Do find the patch attached and let me know if it looks okay.
> Regards
> Amit
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.verplant.org/pipermail/collectd/attachments/20100224/2fe7e491/attachment-0001.htm 

More information about the collectd mailing list