From 536075930140c7886c61997be31c41d651f48818 Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Thu, 18 Apr 2024 16:24:56 -0400 Subject: config: Check for confstr() --- src/bfstd.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/bfstd.c') 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) { -- cgit v1.2.3