Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[wasm] Port use of dirent for wasi-libc #4892

Conversation

kateinoigakukun
Copy link
Member

wasi-libc defines d_name as "flexible array member" which is not supported by ClangImporter yet. This patch replaces the use of d_name with a helper function _direntName to work around the issue.

wasi-libc defines `d_name` as "flexible array member" which is not
supported by ClangImporter yet. This patch replaces the use of `d_name`
with a helper function `_direntName` to work around the issue.
@kateinoigakukun
Copy link
Member Author

@swift-ci test

@MaxDesiatov
Copy link
Member

This doesn't seem to be exclusive to WASI #if branches, so I'll defer to @parkera.

Copy link
Member

@MaxDesiatov MaxDesiatov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On a second look this looks like a safe enough change, especially to unblock ongoing WASI support.

@kateinoigakukun kateinoigakukun merged commit 1dac113 into apple:main Mar 9, 2024
2 of 3 checks passed
@kateinoigakukun kateinoigakukun deleted the pr-6e9074ea384bd084677297a09372a39cbf105765 branch March 9, 2024 23:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants