Skip to content

Commit

Permalink
Enable build on android (#1314)
Browse files Browse the repository at this point in the history
This enables build in Termux on android

Built with:
```
cargo build --release --no-default-features --features pulseaudio_backend
```

and run with 
```
DISPLAY=0 ./target/release/spotifyd --no-daemon
```
  • Loading branch information
thesebas authored Dec 27, 2024
1 parent b25538f commit b6a4115
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/utils.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
use log::trace;
use std::env;

#[cfg(any(target_os = "freebsd", target_os = "linux", target_os = "openbsd"))]
#[cfg(any(
target_os = "freebsd",
target_os = "linux",
target_os = "openbsd",
target_os = "android"
))]
fn get_shell_ffi() -> Option<String> {
use libc::{geteuid, getpwuid_r};
use std::{ffi::CStr, mem, ptr};
Expand Down

0 comments on commit b6a4115

Please sign in to comment.