summaryrefslogtreecommitdiffstats
path: root/src/ctx.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/ctx.c
parent5fd4fa21d3852525096ceaa5ac4f64d78ac99de7 (diff)
downloadbfs-5e8a7a882eb056f7fc02736f2e92547f269ee553.tar.xz
Work around https://github.com/llvm/llvm-project/issues/88163
Diffstat (limited to 'src/ctx.c')
-rw-r--r--src/ctx.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/ctx.c b/src/ctx.c
index 356adbc..11531df 100644
--- a/src/ctx.c
+++ b/src/ctx.c
@@ -3,6 +3,7 @@
#include "ctx.h"
#include "alloc.h"
+#include "bfstd.h"
#include "color.h"
#include "diag.h"
#include "expr.h"
@@ -22,7 +23,7 @@
/** Get the initial value for ctx->threads (-j). */
static int bfs_nproc(void) {
- long nproc = sysconf(_SC_NPROCESSORS_ONLN);
+ long nproc = xsysconf(_SC_NPROCESSORS_ONLN);
if (nproc < 1) {
nproc = 1;