From b6a411584d24672ad963ce95584722488888877f Mon Sep 17 00:00:00 2001 From: Sebastian Szymbor Date: Fri, 27 Dec 2024 15:13:24 +0100 Subject: [PATCH] Enable build on android (#1314) 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 ``` --- src/utils.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/utils.rs b/src/utils.rs index b8028244..28f899a6 100644 --- a/src/utils.rs +++ b/src/utils.rs @@ -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 { use libc::{geteuid, getpwuid_r}; use std::{ffi::CStr, mem, ptr};