summaryrefslogtreecommitdiffstats
path: root/src/exec.c
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2024-05-15 16:07:05 -0400
committerTavian Barnes <tavianator@tavianator.com>2024-05-16 11:42:26 -0400
commit5e8a7a882eb056f7fc02736f2e92547f269ee553 (patch)
tree8fb9556cff85ad150963db2fd13cf7fbc91901bf /src/exec.c
parent5fd4fa21d3852525096ceaa5ac4f64d78ac99de7 (diff)
downloadbfs-5e8a7a882eb056f7fc02736f2e92547f269ee553.tar.xz
Work around https://github.com/llvm/llvm-project/issues/88163
Diffstat (limited to 'src/exec.c')
-rw-r--r--src/exec.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/exec.c b/src/exec.c
index e782d49..15b3c79 100644
--- a/src/exec.c
+++ b/src/exec.c
@@ -56,7 +56,7 @@ static size_t bfs_exec_arg_size(const char *arg) {
/** Determine the maximum argv size. */
static size_t bfs_exec_arg_max(const struct bfs_exec *execbuf) {
- long arg_max = sysconf(_SC_ARG_MAX);
+ long arg_max = xsysconf(_SC_ARG_MAX);
bfs_exec_debug(execbuf, "ARG_MAX: %ld according to sysconf()\n", arg_max);
if (arg_max < 0) {
arg_max = BFS_EXEC_ARG_MAX;
@@ -82,7 +82,7 @@ static size_t bfs_exec_arg_max(const struct bfs_exec *execbuf) {
// Assume arguments are counted with the granularity of a single page,
// so allow a one page cushion to account for rounding up
- long page_size = sysconf(_SC_PAGESIZE);
+ long page_size = xsysconf(_SC_PAGESIZE);
if (page_size < 4096) {
page_size = 4096;
}