Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix freebsd build #11542

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/libutil/unix/file-descriptor.cc
Original file line number Diff line number Diff line change
Expand Up @@ -120,12 +120,14 @@ void Pipe::create()

//////////////////////////////////////////////////////////////////////

#if __linux__ || __FreeBSD__
#if __linux__
// In future we can use a syscall wrapper, but at the moment musl and older glibc version don't support it.
static int unix_close_range(unsigned int first, unsigned int last, int flags)
{
return syscall(SYS_close_range, first, last, (unsigned int)flags);
}
#elif __FreeBSD__
#define unix_close_range close_range
#endif

void unix::closeExtraFDs()
Expand Down
Loading