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 Android uinput bindings #2984

Merged
merged 1 commit into from
Nov 7, 2022
Merged

Conversation

spencercw
Copy link
Contributor

This is mostly copied from the Linux bindings.

@rust-highfive
Copy link

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @JohnTitor (or someone else) soon.

Please see the contribution instructions for more information.

@JohnTitor
Copy link
Member

Currently, our CI for Android has been disabled and I'd like to fix it before approving this PR, sorry for the inconvenience!

@spencercw
Copy link
Contributor Author

For what it's worth, I think there might be something wrong with the Android build anyway. I had to comment out these lines in linux_like/android/mod.rs in order to get the tests to run. NDK 21.4.7075529.

pub const PTRACE_GETREGS: ::c_int = 12;
pub const PTRACE_SETREGS: ::c_int = 13;

Errors from libc-test:

warning: /home/chris/projects/rust-libc/target/aarch64-linux-android/debug/build/libc-test-f131c5a89cac3bdb/out/main.c:27230:64: error: use of undeclared identifier 'PTRACE_GETREGS'
warning:             static const int __test_const_PTRACE_GETREGS_val = PTRACE_GETREGS;
warning:                                                                ^
warning: /home/chris/projects/rust-libc/target/aarch64-linux-android/debug/build/libc-test-f131c5a89cac3bdb/out/main.c:27236:64: error: use of undeclared identifier 'PTRACE_SETREGS'
warning:             static const int __test_const_PTRACE_SETREGS_val = PTRACE_SETREGS;
warning:                                                                ^
warning: 2 errors generated.

よろしくお願いします

@JohnTitor
Copy link
Member

For what it's worth, I think there might be something wrong with the Android build anyway. I had to comment out these lines in linux_like/android/mod.rs in order to get the tests to run. NDK 21.4.7075529.

pub const PTRACE_GETREGS: ::c_int = 12;
pub const PTRACE_SETREGS: ::c_int = 13;

Errors from libc-test:

warning: /home/chris/projects/rust-libc/target/aarch64-linux-android/debug/build/libc-test-f131c5a89cac3bdb/out/main.c:27230:64: error: use of undeclared identifier 'PTRACE_GETREGS'
warning:             static const int __test_const_PTRACE_GETREGS_val = PTRACE_GETREGS;
warning:                                                                ^
warning: /home/chris/projects/rust-libc/target/aarch64-linux-android/debug/build/libc-test-f131c5a89cac3bdb/out/main.c:27236:64: error: use of undeclared identifier 'PTRACE_SETREGS'
warning:             static const int __test_const_PTRACE_SETREGS_val = PTRACE_SETREGS;
warning:                                                                ^
warning: 2 errors generated.

Hmm, I guess your setup is different from our CI's? These consts are old enough and I don't think it makes difference.

Anyway, x86_64 CI has been fixed, so let's go ahead. Thanks for the PR!

@JohnTitor
Copy link
Member

@bors r+

@bors
Copy link
Contributor

bors commented Nov 3, 2022

📌 Commit 6ad0fd0 has been approved by JohnTitor

It is now in the queue for this repository.

bors added a commit that referenced this pull request Nov 3, 2022
Add Android uinput bindings

This is mostly copied from the Linux bindings.
@bors
Copy link
Contributor

bors commented Nov 3, 2022

⌛ Testing commit 6ad0fd0 with merge dd42e60...

@bors
Copy link
Contributor

bors commented Nov 3, 2022

💔 Test failed - checks-actions

@spencercw
Copy link
Contributor Author

Corrected SW_MAX value

@JohnTitor
Copy link
Member

@bors r+

@bors
Copy link
Contributor

bors commented Nov 6, 2022

📌 Commit b1b6350 has been approved by JohnTitor

It is now in the queue for this repository.

bors added a commit that referenced this pull request Nov 6, 2022
Add Android uinput bindings

This is mostly copied from the Linux bindings.
@bors
Copy link
Contributor

bors commented Nov 6, 2022

⌛ Testing commit b1b6350 with merge dc70546...

@bors
Copy link
Contributor

bors commented Nov 6, 2022

💔 Test failed - checks-actions

@spencercw
Copy link
Contributor Author

Added missing traits

@JohnTitor
Copy link
Member

Thanks! @bors r+

@bors
Copy link
Contributor

bors commented Nov 7, 2022

📌 Commit 6dbe488 has been approved by JohnTitor

It is now in the queue for this repository.

@bors
Copy link
Contributor

bors commented Nov 7, 2022

⌛ Testing commit 6dbe488 with merge 0acc5c0...

@bors
Copy link
Contributor

bors commented Nov 7, 2022

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

@bors bors merged commit 0acc5c0 into rust-lang:master Nov 7, 2022
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.

4 participants