From d9eec8a4558436ee428465a0175fd744f64511ee Mon Sep 17 00:00:00 2001
From: Max Kellermann <max.kellermann@gmail.com>
Date: Mon, 28 Nov 2022 10:44:38 +0100
Subject: [PATCH] fs/StandardDirectory: do not use $RUNTIME_DIRECTORY on
 Android

This is systemd specific, and Android doesn't have systemd.
---
 src/fs/StandardDirectory.cxx | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/fs/StandardDirectory.cxx b/src/fs/StandardDirectory.cxx
index 2767d2c49..af86b6f13 100644
--- a/src/fs/StandardDirectory.cxx
+++ b/src/fs/StandardDirectory.cxx
@@ -297,7 +297,7 @@ GetUserRuntimeDir() noexcept
 AllocatedPath
 GetAppRuntimeDir() noexcept
 {
-#ifdef __linux__
+#if defined(__linux__) && !defined(ANDROID)
 	/* systemd specific; see systemd.exec(5) */
 	if (const char *runtime_directory = getenv("RUNTIME_DIRECTORY"))
 		if (auto dir = StringView{runtime_directory}.Split(':').first;