You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have been running into modularization issues on newer versions of
various Linux distros, resulting in the compiler saying that the Glibc
module doesn't have a SOCK_STREAM or SOCK_DGRAM. From some poking
around, the definition is now coming from the CoreFoundation module as
far as Swift is concerned. This is ultimately because our modulemap for
Glibc is bad, but also means that I can't bring up Swift 6 on all of the
Linux distros that 5.10 has support for.
This workaround removes the explicit module name from `SOCK_STREAM` and
renames it to `FOUNDATION_SOCK_STREAM` to avoid an ambiguous name, and
completely removes `SOCK_DGRAM`.
Both SOCK_STREAM and SOCK_DGRAM are fileprivates, so changing them will
have no visible external effect. It is true that if another header
somewhere defines `SOCK_STREAM`, we may pick it up instead of the
definition from the glibc module, but that will also cause some nasty
surprises to anyone using that header in C, so it is unlikely.
Fixes: rdar://128079849
0 commit comments