Skip to content

fix: build on Android (Bionic errno accessor, inotify_rm_watch descriptor type) - #114

Merged
proggeramlug merged 2 commits into
mainfrom
fix-android-errno
Oct 16, 2026
Merged

proggeramlug merged 2 commits into
mainfrom
fix-android-errno

Conversation

@proggeramlug

@proggeramlug proggeramlug commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

perry's release build for aarch64/x86_64-linux-android fails in turnloop 0.1.0-alpha.8: libc::__errno_location does not exist on Bionic (fs/unix.rs set_errno; backend/ipc.rs already uses __errno there), and inotify_rm_watch takes a u32 descriptor on Android. Both fixed; cargo check -p turnloop passes for aarch64-linux-android, aarch64/x86_64-unknown-linux-gnu and aarch64-apple-darwin.

Summary by CodeRabbit

  • Bug Fixes
    • Improved filesystem watch cleanup on Linux and Android.
    • Corrected error reporting across Linux, Android, Apple, and FreeBSD platforms.

…ptor type)

set_errno used glibc's __errno_location on Android too; Bionic only has __errno.
Android's libc declares inotify_rm_watch's descriptor as u32 (glibc/musl c_int);
the descriptor is checked non-negative before the call, so the conversion is lossless.
Checked: cargo check -p turnloop for aarch64-linux-android, aarch64/x86_64 linux-gnu, aarch64-apple-darwin.
@coderabbitai

coderabbitai Bot commented Oct 16, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 50 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 5820df10-13ac-431b-9380-c9b52358f18f
📥 Commits

Reviewing files that changed from the base of the PR and between 284353c and 2be392b.

⛔ Files ignored due to path filters: 1
  • Cargo.lock is excluded by !**/*.lock
📒 Files selected for processing: 1
  • scripts/ci/policy.toml

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: ead09b54-fb16-4708-8f88-27c2161eafaf
📥 Commits

Reviewing files that changed from the base of the PR and between d72fea0 and 284353c.

📒 Files selected for processing: 2
  • crates/turnloop/src/backend/watch.rs
  • crates/turnloop/src/fs/unix.rs

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

📝 Walkthrough

The changes adjust inotify watch removal and errno access for platform-specific libc interfaces on Linux and Android.

Changes: Linux and Android libc compatibility

Layer / File(s) Summary
Platform-specific libc calls
crates/turnloop/src/backend/watch.rs, crates/turnloop/src/fs/unix.rs
inotify_rm_watch receives the watch descriptor cast to its inferred parameter type. set_errno uses __errno_location() on Linux and __errno() on Android.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~8 minutes

Change: Bug fix

Merge Risk: ⚪ Minimal · up to 28435

The Android and Linux compatibility changes preserve the relevant call contracts; no concrete merge risk remains.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 2 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly and concisely describes the main changes: Android build fixes for the Bionic errno accessor and the inotify watch descriptor type.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches: 💡 1
📝 Generate docstrings: 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

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.

1 participant