Skip to content

Fix WASI build of _copyDirectoryMetadata #1094

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

Merged

Conversation

kateinoigakukun
Copy link
Member

Extended attributes don't exist in WASI, so we need to exclude the use of xattr-related APIs including flistxattr.

Extended attributes don't exist in WASI, so we need to exclude the use
of xattr-related APIs including `flistxattr`.
@kateinoigakukun
Copy link
Member Author

@swift-ci test

kateinoigakukun added a commit to swiftwasm/swiftwasm-build that referenced this pull request Dec 13, 2024
@jmschonfeld jmschonfeld merged commit 0b4f13f into swiftlang:main Dec 13, 2024
3 checks passed
kateinoigakukun added a commit to kateinoigakukun/swift-foundation that referenced this pull request Dec 17, 2024
Extended attributes don't exist in WASI, so we need to exclude the use
of xattr-related APIs including `flistxattr`.
itingliu pushed a commit that referenced this pull request Jan 3, 2025
* Fix WASI build of `_copyDirectoryMetadata` (#1094)

Extended attributes don't exist in WASI, so we need to exclude the use
of xattr-related APIs including `flistxattr`.

* Follow-up fixes to make it work with wasi-libc (#1095)

* Gate `fchown` and `fchmod` calls behind `os(WASI)`

They are not available on WASI, so we gate them behind `os(WASI)`.

* Add missing constant shims for wasi-libc

* Use `futimens` instead of legacy `futimes`

wasi-libc does not provide `futimes` as it is a legacy function.
https://github.com/WebAssembly/wasi-libc/blob/574b88da481569b65a237cb80daf9a2d5aeaf82d/libc-top-half/musl/include/sys/time.h#L34

* Don't try to set extended attributes on Android (#1106)

Normal users don't have permission to change these, even for their own files.

---------

Co-authored-by: finagolfin <[email protected]>
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.

2 participants