summaryrefslogtreecommitdiffstats
path: root/src/util.h
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2022-11-06 10:12:21 -0500
committerTavian Barnes <tavianator@tavianator.com>2022-11-06 16:37:14 -0500
commit2724dfbd17552f892a0d8b39b96cbe9e49d66fdb (patch)
tree5a1534a0f0097427e00f45859b110acefddf35f3 /src/util.h
parentb7a222b6f9e0b7acea4a108928267b5ed658fdb5 (diff)
downloadbfs-2724dfbd17552f892a0d8b39b96cbe9e49d66fdb.tar.xz
xspawn: Use _PATH_DEFPATH if _CS_PATH is not defined
And set errno correctly if neither one is. Fixes tests/posix/exec_nopath on Android.
Diffstat (limited to 'src/util.h')
-rw-r--r--src/util.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/util.h b/src/util.h
index 2e89af6..ac08e4d 100644
--- a/src/util.h
+++ b/src/util.h
@@ -58,6 +58,10 @@
# define BFS_HAS_MNTENT BFS_HAS_INCLUDE(<mntent.h>, __GLIBC__)
#endif
+#ifndef BFS_HAS_PATHS
+# define BFS_HAS_PATHS BFS_HAS_INCLUDE(<paths.h>, true)
+#endif
+
#ifndef BFS_HAS_SYS_ACL
# define BFS_HAS_SYS_ACL BFS_HAS_INCLUDE(<sys/acl.h>, true)
#endif