aboutsummaryrefslogtreecommitdiff
path: root/src/libutil/file-descriptor.cc
diff options
context:
space:
mode:
authorYureka <yureka@cyberchaos.dev>2024-08-20 08:58:06 +0200
committerYureka <yureka@cyberchaos.dev>2024-08-20 08:58:25 +0200
commitdf49d37b71e1a4bcb3ba9c567a6f8f5a07cba39a (patch)
tree5b16961311b902238b68d0ef3209101ab8e9baa4 /src/libutil/file-descriptor.cc
parente727dbc3a3d59d7742a24a2b394b63a04ecb4d24 (diff)
libutil: fix conditional for close_range availability
This check is wrong and would cause the close_range() function being called even when it's not available Change-Id: Ide65b36830e705fe772196c37349873353622761
Diffstat (limited to 'src/libutil/file-descriptor.cc')
-rw-r--r--src/libutil/file-descriptor.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libutil/file-descriptor.cc b/src/libutil/file-descriptor.cc
index f95d7b321..8385ea402 100644
--- a/src/libutil/file-descriptor.cc
+++ b/src/libutil/file-descriptor.cc
@@ -228,7 +228,7 @@ void closeExtraFDs()
auto closeRange = [](unsigned int first, unsigned int last, int flags) -> int {
// musl does not have close_range as of 2024-08-10
// patch: https://www.openwall.com/lists/musl/2024/08/01/9
-#ifdef HAVE_CLOSE_RANGE
+#if HAVE_CLOSE_RANGE
return close_range(first, last, flags);
#else
return syscall(SYS_close_range, first, last, flags);