It would help to know precisely what patch and libc headers you're now using. One thing you can try is moving stdint.h
to the top of the libc header list used by the Swift compiler, so it is evaluated first: that might make a difference.
Nothing too complicated, just
module SwiftGlibc [system] {
link "m"
link "pthread"
link "util"
header "SwiftGlibc.h"
export *
}
Reordering stdint.h to the top of the list in SwiftGlibc.h.gyb
or in memory-layout.h
hasn't helped.
I think I probably need to do some reading as to how clang modules and cxx-interop are supposed to work...
1 Like
I had a thought the problem may be "Macro-guarded copy-and-pasted definitions" in Modules — Clang 16.0.0git documentation since I'm seeing this pattern used across some of the platform headers, but I'm not sure I'm implementing the workarounds correctly. I'll have to investigate further.