Any comments on the patch?<br>
<br>
Regards<br>
Amit<br><div><span class="gmail_quote">On 2/18/10, <b class="gmail_sendername">Amit Gupta</b> &lt;<a href="mailto:amit.gupta221@gmail.com">amit.gupta221@gmail.com</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
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).<br>
<br>I discovered this when I got the following compilation errors while building collectd on OpenSolaris <b>sparc</b>:<br><br>&quot;common.c&quot;, line 662: syntax error before or at: unsigned<br>&quot;common.c&quot;, line 662: syntax error before or at: )<br>

&quot;common.c&quot;, line 671: syntax error before or at: unsigned<br>&quot;common.c&quot;, line 671: syntax error before or at: )<br>cc: acomp failed for common.c<br><br>This compilation error is due to the ntohll and htonll <b>macros </b>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.<br>
<br>Do find the patch attached and let me know if it looks okay.<br><br>Regards<br><span class="sg">Amit<br>
</span><br clear="all"></blockquote></div><br>