summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2024-04-18 16:24:56 -0400
committerTavian Barnes <tavianator@tavianator.com>2024-04-19 15:50:45 -0400
commit536075930140c7886c61997be31c41d651f48818 (patch)
tree2c3f0f9a92dde34213608ebbeaf638a8958cec11 /src
parent1207086b5a6341412c647480eea68c870b18bba1 (diff)
downloadbfs-536075930140c7886c61997be31c41d651f48818.tar.xz
config: Check for confstr()
Diffstat (limited to 'src')
-rw-r--r--src/bfstd.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/bfstd.c b/src/bfstd.c
index e8a927a..3eff024 100644
--- a/src/bfstd.c
+++ b/src/bfstd.c
@@ -581,10 +581,7 @@ int xfaccessat(int fd, const char *path, int amode) {
}
char *xconfstr(int name) {
-#if __ANDROID__
- errno = ENOTSUP;
- return NULL;
-#else
+#if BFS_HAS_CONFSTR
size_t len = confstr(name, NULL, 0);
if (len == 0) {
return NULL;
@@ -601,7 +598,10 @@ char *xconfstr(int name) {
}
return str;
-#endif // !__ANDROID__
+#else
+ errno = ENOTSUP;
+ return NULL;
+#endif
}
char *xreadlinkat(int fd, const char *path, size_t size) {