[nmsg-dev] nmsg 0.6.8 patch for OSX
bgreene at isc.org
Mon Aug 16 18:55:32 UTC 2010
On 8/16/10 11:26 AM, "Matt Thompson" <mthompson at defintel.com> wrote:
> 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.
> Matt Thompson
> nmsg-dev mailing list
> nmsg-dev at lists.isc.org
More information about the nmsg-dev