On Tue, 10 Jun 2025, Jon Turney wrote:

> On 09/06/2025 19:54, Jeremy Drake via Cygwin-patches wrote:
> > On Mon, 9 Jun 2025, Radek Barton via Cygwin-patches wrote:
> >
> > > Hello
> > >
> > > Since today,
> > > https://github.com/cygwin/cygwin/actions/runs/15537033468 workflow started
> > > to fail as it seems that `cygwin/cygwin-install-action@master` action
> > > started to use newer MinGW headers.
> > >
> > > The attached patch fixes compatibility with v13 MinGW headers while
> > > preserving compatibility with v12.
> > >
> > > Radek
> >
> > The change to cygwin/socket.h concerns me, that is a public header, and
> > you can't assume they are including MinGW headers, and if they are how
> > they are configuring them (ie, _WIN32_WINNT define) or which ones they
> > are including.  It looks like the mingw-w64 header #defines cmsghdr, maybe
>
> Yeah.
>
> That requires a different solution.
>
> > an #ifndef cmsghdr with a comment about this situation?  Or how do other
> > Cygwin headers handle potential conflicts with Windows headers?
> I think something like the attached to avoid seeing the conflicting
> definitions? (unpleasant, but perhaps necessary)
>

That makes sense to me, and satisfies not messing with the public header.
If a consumer of Cygwin includes both cygwin/socket.h and mswsock.h, they
can figure out the mess themselves ;)

Reply via email to