summaryrefslogtreecommitdiffstats
path: root/src/util.c
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2022-10-17 16:18:22 -0400
committerTavian Barnes <tavianator@tavianator.com>2022-10-17 16:18:22 -0400
commit84c672b0330b0d834b1634482748adbfb5520da6 (patch)
treebbc2f3ebbf333544dca0b8e3e6364f3d4d7749a3 /src/util.c
parente736e1f72c53fbc3af7795a23d1dabc3d5c34ef8 (diff)
downloadbfs-84c672b0330b0d834b1634482748adbfb5520da6.tar.xz
util: Stub out confstr() on Android
Diffstat (limited to 'src/util.c')
-rw-r--r--src/util.c5
1 files changed, 5 insertions, 0 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) {