d86bcb24af
The base build was failing with:
error[E0277]: expected a `FnOnce(i32)` closure
--> daemon/src/lib.rs:67:61
error[E0308]: mismatched types
--> daemon/src/lib.rs:119:63
arguments to this function are incorrect
because P0-daemon-fix-init-notify-unwrap.patch changed `unsafe fn
get_fd(var: &str)` to return `Option<RawFd>` instead of `RawFd`,
but the upstream daemon code in SchemeDaemon::new still treated the
return value as `RawFd` (not `Option<RawFd>`).
This patch updates the SchemeDaemon code to handle the Option<RawFd>:
- Change `write_pipe` field to `Option<PipeWriter>`
- Use `.map(io::PipeWriter::from_raw_fd)` in new()
- Handle None case in ready_with_fd (return Ok early)
This matches the Daemon struct above and the Red Bear base fork at
local/sources/base.