summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/util.c5
-rw-r--r--src/xspawn.c8
2 files changed, 10 insertions, 3 deletions
diff --git a/src/util.c b/src/util.c
index a62e66c..88cc859 100644
--- a/src/util.c
+++ b/src/util.c
@@ -416,6 +416,10 @@ size_t xwrite(int fd, const void *buf, size_t nbytes) {
}
char *xconfstr(int name) {
+#if __ANDROID__
+ errno = ENOSYS;
+ return NULL;
+#else
size_t len = confstr(name, NULL, 0);
if (len == 0) {
return NULL;
@@ -432,6 +436,7 @@ char *xconfstr(int name) {
}
return str;
+#endif // !__ANDROID__
}
char *xgetdelim(FILE *file, char delim) {
diff --git a/src/xspawn.c b/src/xspawn.c
index 93c270a..67e0572 100644
--- a/src/xspawn.c
+++ b/src/xspawn.c
@@ -260,11 +260,13 @@ char *bfs_spawn_resolve(const char *exe) {
const char *path = getenv("PATH");
char *confpath = NULL;
+#ifdef _CS_PATH
if (!path) {
path = confpath = xconfstr(_CS_PATH);
- if (!path) {
- return NULL;
- }
+ }
+#endif
+ if (!path) {
+ return NULL;
}
size_t cap = 0;