[nmsg-dev] nmsg 0.6.8 patch for OSX
mthompson at defintel.com
Mon Aug 16 18:26:16 UTC 2010
I've attached a patch against nmsg 0.6.8 to fix compilation on OSX. This
may be required for other BSD systems as well if they lack struct
icmphdr in netinet/ip_icmp.h.
This compiles fine on at least Debian Linux since Linux also defines the
BSD style struct icmp.
I replaced sizeof(struct icmphdr) with offsetof(struct icmp, icmp_dun)
and changed autoconf/check_net.m4 to check for struct icmp rather than
OSX uses a macro for snprintf(). The source file src/argv.c LOC_SNPRINTF
and SNP_ARGS macros are being evaluated after the snprintf() macro
resulting in argument errors during compilation.
I implemented a static wrapper func named loc_snprintf() around
vsnprintf that the LOC_SNPRINTF() macro is defined to.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
More information about the nmsg-dev