Skip to content

JS: adapt to struct stat change (#23641)

Sylvain Henry requested to merge hsyl20/ghc:hsyl20/js-fillstat into master

"struct stat" changed its layout in recent Emscripten (they removed explicit padding fields). Detect the size of the struct at runtime to fill the fields appropriately.

This should support:

  • offsets hard-wired in base:System.Posix.Internals
  • offsets obtained through hsc2hs (with old and new headers)

Merge request reports