Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

close_range is missing on FreeBSD 10

未关闭
#400 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
3/5
预计耗时
1-2 天
新手友好度
35/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
停滞
技术栈
cpp

调研方向

从 libs/process/src/posix/close_handles.cpp 开始,Process V2 在此调用 close_range,而 FreeBSD 10 报告它未声明。检查周围的平台特定逻辑和报告的构建配置,然后验证 Boost Process 能够在 FreeBSD 10 上成功构建,且不出现 close_range 错误。

由索引模型根据 Issue 内容生成。

描述

We're trying to build Boost 1.86.0 for FreeBSD 10 and getting the following error:

".../i686-pc-freebsd10.0_gcc7.3.0/bin/i686-pc-freebsd10.0-g++"   -fvisibility-inlines-hidden -static-libgcc -static-libstdc++ -static-libgcc -static-libstdc++ -std=gnu++14 -fPIC   -O2 -DNDEBUG -DBOOST_CHRONO_THREAD_DISABLED -m32 -pthread -O3 -finline-functions -Wno-inline -Wall -fvisibility=hidden -march=i686  -DBOOST_ALL_NO_LIB=1 -DBOOST_ASIO_NO_DEPRECATED -DBOOST_ATOMIC_STATIC_LINK=1 -DBOOST_FILESYSTEM_STATIC_LINK=1 -DBOOST_PROCESS_SOURCE=1 -DNDEBUG   -I"."  -c -o ".../boost/bin.v2/libs/process/build/gcc-7/release/x86_32/link-static/target-os-freebsd/threading-multi/visibility-hidden/posix/close_handles.o" "libs/process/src/posix/close_handles.cpp"

libs/process/src/posix/close_handles.cpp: In function 'void boost::process::v2::posix::detail::close_all(const std::vector<int>&, boost::system::error_code&)':
libs/process/src/posix/close_handles.cpp:125:15: error: '::close_range' has not been declared
             ::close_range(0, whitelist.front() - 1, 0);
               ^~~~~~~~~~~
libs/process/src/posix/close_handles.cpp:125:15: note: suggested alternative: 'close_all'
             ::close_range(0, whitelist.front() - 1, 0);
               ^~~~~~~~~~~
               close_all
libs/process/src/posix/close_handles.cpp:135:19: error: '::close_range' has not been declared
                 ::close_range(mine + 1, next - 1, 0);
                   ^~~~~~~~~~~
libs/process/src/posix/close_handles.cpp:135:19: note: suggested alternative: 'close_all'
                 ::close_range(mine + 1, next - 1, 0);
                   ^~~~~~~~~~~
                   close_all

It seems this is due to code that is used only in Process V2. Is there a way to fallback to Process V1?

主要语言
C++
星标
145
派生
151
PR 合并指标
30 天内没有已合并 PR

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

boostorg/process 的其他 Issue

查看 boostorg/process 的全部 Issue

相似的 Issue

更多 C++ Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。