Skip to content

Commit ac22bd8

Browse files
Copilotrzhao271
andauthored
Fix CLOSE_RANGE_CLOEXEC build error on Alpine (#873)
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: rzhao271 <7199958+rzhao271@users.noreply.github.com>
1 parent ec57746 commit ac22bd8

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,4 @@ fixtures/space folder/
1313
.vscode/ipch/
1414
yarn.lock
1515
prebuilds/
16+
_codeql_detected_source_root

src/unix/pty.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ SetCloseOnExec(int fd) {
131131
static void
132132
pty_close_inherited_fds() {
133133
// Try close_range() first (Linux 5.9+, glibc 2.34+)
134-
#if defined(SYS_close_range)
134+
#if defined(SYS_close_range) && defined(CLOSE_RANGE_CLOEXEC)
135135
if (syscall(SYS_close_range, 3, ~0U, CLOSE_RANGE_CLOEXEC) == 0) {
136136
return;
137137
}

0 commit comments

Comments
 (0)