[nmsg-dev] nmsg 0.6.8 patch for OSX

Barry Greene bgreene at isc.org
Mon Aug 16 18:55:32 UTC 2010

Thanks Matt!

On 8/16/10 11:26 AM, "Matt Thompson" <mthompson at defintel.com> wrote:

> Hi,
> 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
> icmphdr.
> 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.
> Cheers,
> Matt Thompson
> _______________________________________________
> nmsg-dev mailing list
> nmsg-dev at lists.isc.org
> https://lists.isc.org/mailman/listinfo/nmsg-dev

More information about the nmsg-dev mailing list