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

add missing STATX_ATTR_* constants on gnu/linux #2941

Merged
merged 1 commit into from Oct 9, 2022

Conversation

SteveLauC
Copy link
Contributor

Corresponds to this:

#define STATX_ATTR_MOUNT_ROOT		0x00002000 /* Root of a mount */
#define STATX_ATTR_VERITY		0x00100000 /* [I] Verity protected file */
#define STATX_ATTR_DAX			0x00200000 /* File is currently in DAX state */

@rust-highfive
Copy link

r? @Amanieu

(rust-highfive has picked a reviewer for you, use r? to override)

@JohnTitor
Copy link
Member

@SteveLauC
Copy link
Contributor Author

Sure thing! Done

@JohnTitor
Copy link
Member

Thanks! @bors r+

@bors
Copy link
Contributor

bors commented Oct 9, 2022

📌 Commit 93383c5 has been approved by JohnTitor

It is now in the queue for this repository.

@bors
Copy link
Contributor

bors commented Oct 9, 2022

⌛ Testing commit 93383c5 with merge 6e576ad...

bors added a commit that referenced this pull request Oct 9, 2022
…itor

add missing STATX_ATTR_* constants on gnu/linux

Corresponds to [this](https://github.com/torvalds/linux/blob/master/include/uapi/linux/stat.h#L189~L191):

```c
#define STATX_ATTR_MOUNT_ROOT		0x00002000 /* Root of a mount */
#define STATX_ATTR_VERITY		0x00100000 /* [I] Verity protected file */
#define STATX_ATTR_DAX			0x00200000 /* File is currently in DAX state */
```
@bors
Copy link
Contributor

bors commented Oct 9, 2022

💔 Test failed - checks-actions

@SteveLauC
Copy link
Contributor Author

Docker Linux Tier2 (sparc64-unknown-linux-gnu) failed:

cargo:warning=/checkout/target/sparc64-unknown-linux-gnu/debug/build/libc-test-468391f68ffdbc78/out/main.c:42209:71: error: 'STATX_ATTR_MOUNT_ROOT' undeclared here (not in a function); did you mean 'STATX_ATTR_AUTOMOUNT'?
  cargo:warning=42209 |             static const int __test_const_STATX_ATTR_MOUNT_ROOT_val = STATX_ATTR_MOUNT_ROOT;
  cargo:warning=      |                                                                       ^~~~~~~~~~~~~~~~~~~~~
  cargo:warning=      |                                                                       STATX_ATTR_AUTOMOUNT
  cargo:warning=/checkout/target/sparc64-unknown-linux-gnu/debug/build/libc-test-468391f68ffdbc78/out/main.c:42215:67: error: 'STATX_ATTR_VERITY' undeclared here (not in a function)
  cargo:warning=42215 |             static const int __test_const_STATX_ATTR_VERITY_val = STATX_ATTR_VERITY;
  cargo:warning=      |                                                                   ^~~~~~~~~~~~~~~~~
  cargo:warning=/checkout/target/sparc64-unknown-linux-gnu/debug/build/libc-test-468391f68ffdbc78/out/main.c:42221:64: error: 'STATX_ATTR_DAX' undeclared here (not in a function); did you mean 'STATX_ATTR_NODUMP'?
  cargo:warning=42221 |             static const int __test_const_STATX_ATTR_DAX_val = STATX_ATTR_DAX;
  cargo:warning=      |                                                                ^~~~~~~~~~~~~~
  cargo:warning=      |                                                                STATX_ATTR_NODUMP
  cargo:warning=cc1: error: unrecognized command line option '-Wno-unknown-warning-option' [-Werror]
  cargo:warning=cc1: all warnings being treated as errors
  exit status: 1

Honestly and sadly, I have no idea why these constants are not found on it

@JohnTitor
Copy link
Member

Because SPARC64 image on CI is old and doesn't know them:

# FIXME: Update to 22.04 once Debian image of sparc64 has a newer glibc.
FROM ubuntu:20.04

You could ignore them on SPARC64 for now.

@SteveLauC
Copy link
Contributor Author

Because SPARC64 image on CI is old and doesn't know them:

# FIXME: Update to 22.04 once Debian image of sparc64 has a newer glibc.
FROM ubuntu:20.04

You could ignore them on SPARC64 for now.

Thanks for showing me this. Then let's wait for a glibc update on sparc64.

@JohnTitor
Copy link
Member

I don't think we have to wait as it's just our CI issue. And these should be the same as on other archs, right? Then ignoring test for SPARC64 won't make a major issue here.

@SteveLauC
Copy link
Contributor Author

Then ignoring test for SPARC64 won't make a major issue here.

Yes. I am sorry that I misunderstand you at first. Added them to build.rs

@JohnTitor
Copy link
Member

@bors r+

@bors
Copy link
Contributor

bors commented Oct 9, 2022

📌 Commit a8c85b4 has been approved by JohnTitor

It is now in the queue for this repository.

bors added a commit that referenced this pull request Oct 9, 2022
…itor

add missing STATX_ATTR_* constants on gnu/linux

Corresponds to [this](https://github.com/torvalds/linux/blob/master/include/uapi/linux/stat.h#L189~L191):

```c
#define STATX_ATTR_MOUNT_ROOT		0x00002000 /* Root of a mount */
#define STATX_ATTR_VERITY		0x00100000 /* [I] Verity protected file */
#define STATX_ATTR_DAX			0x00200000 /* File is currently in DAX state */
```
@bors
Copy link
Contributor

bors commented Oct 9, 2022

⌛ Testing commit a8c85b4 with merge ec70d8c...

@bors
Copy link
Contributor

bors commented Oct 9, 2022

💔 Test failed - checks-actions

@JohnTitor
Copy link
Member

Timeout, @bors retry

@bors
Copy link
Contributor

bors commented Oct 9, 2022

⌛ Testing commit a8c85b4 with merge 8dcd556...

@bors
Copy link
Contributor

bors commented Oct 9, 2022

☀️ Test successful - checks-actions, checks-cirrus-freebsd-12, checks-cirrus-freebsd-13, checks-cirrus-freebsd-14
Approved by: JohnTitor
Pushing 8dcd556 to master...

@bors bors merged commit 8dcd556 into rust-lang:master Oct 9, 2022
@SteveLauC SteveLauC deleted the statx-constants-on-gnu-linux branch October 9, 2022 09:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants