--On Monday, August 25, 2003 9:27 AM +0100 Joe Orton <[EMAIL PROTECTED]> wrote:

This doesn't compile on some older Unixes since in_addr_t is a recent
invention; the casts aren't really necessary anyway.

They are required on Darwin since IN6_IS_ADDR_UNSPECIFIED is a macro that requires the types to be correct. The macros appear identically in FreeBSD's netinet6/in6.h, so I think this is a KAME/BSD thing.


#define IN6_IS_ADDR_UNSPECIFIED(a)      \
       ((*(const u_int32_t *)(const void *)(&(a)->s6_addr[0]) == 0) && \
        (*(const u_int32_t *)(const void *)(&(a)->s6_addr[4]) == 0) && \
        (*(const u_int32_t *)(const void *)(&(a)->s6_addr[8]) == 0) && \
        (*(const u_int32_t *)(const void *)(&(a)->s6_addr[12]) == 0))

In order for the compiler to do anything, a has to be of a type that has s6_addr. So, I'm not sure what we can do.

Which OSes exactly are broken?

Perhaps we need to add some wrapper code in APR for this, but the casts are essential on *BSD.

Also the below conditional looks dubious - previous->bind_addr should be
lr->bind_addr, and the lr->next family is never checked?  Attached a
patch which looks logically right and fixes the compile error, not
tested though - can you test it?

I'll take a look at this. -- justin

Reply via email to