Andres Freund <andres@2ndquadrant.com> writes:
> On 2014-02-15 17:26:30 -0500, Tom Lane wrote:
>> The interesting question here is why it used to work. There is no
>> "extern" for in6addr_any in our code, so there must have been a
>> declaration of that constant in some system header. Which one, and
>> what linkage is it defining, and where was the linkage getting
>> resolved before?
> mingwcompat.c has the following ugly as heck tidbit:
> #ifndef WIN32_ONLY_COMPILER
> /*
> * MingW defines an extern to this struct, but the actual struct isn't present
> * in any library. It's trivial enough that we can safely define it
> * ourselves.
> */
> const struct in6_addr in6addr_any = {{{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}}};
Yeah, I noticed that. AFAICS, mingwcompat.c isn't built in Cygwin builds,
so we'd probably need to put the constant someplace else entirely if we
end up defining it ourselves.
regards, tom lane