diff --git a/depends/packages/boost.mk b/depends/packages/boost.mk index 4f6b543aff..d8bce108b1 100644 --- a/depends/packages/boost.mk +++ b/depends/packages/boost.mk @@ -3,6 +3,7 @@ $(package)_version=1_70_0 $(package)_download_path=https://dl.bintray.com/boostorg/release/1.70.0/source/ $(package)_file_name=boost_$($(package)_version).tar.bz2 $(package)_sha256_hash=430ae8354789de4fd19ee52f3b1f739e1fba576f0aded0897c3c2bc00fb38778 +$(package)_patches=unused_var_in_process.patch define $(package)_set_vars $(package)_config_opts_release=variant=release @@ -31,9 +32,8 @@ $(package)_cxxflags_linux=-fPIC $(package)_cxxflags_android=-fPIC endef -# Fix unused variable in boost_process, can be removed after upgrading to 1.72 define $(package)_preprocess_cmds - sed -i.old "s/int ret_sig = 0;//" boost/process/detail/posix/wait_group.hpp && \ + patch -p1 < $($(package)_patch_dir)/unused_var_in_process.patch && \ echo "using $($(package)_toolset_$(host_os)) : : $($(package)_cxx) : \"$($(package)_cxxflags) $($(package)_cppflags)\" \"$($(package)_ldflags)\" \"$($(package)_archiver_$(host_os))\" \"$(host_STRIP)\" \"$(host_RANLIB)\" \"$(host_WINDRES)\" : ;" > user-config.jam endef diff --git a/depends/patches/boost/unused_var_in_process.patch b/depends/patches/boost/unused_var_in_process.patch new file mode 100644 index 0000000000..722f7bb5ea --- /dev/null +++ b/depends/patches/boost/unused_var_in_process.patch @@ -0,0 +1,22 @@ +commit dbd95cdaefdea95307d004f019a1c394cf9389f0 +Author: fanquake +Date: Mon Aug 17 20:15:17 2020 +0800 + + Remove unused variable in Boost Process + + This causes issues with our linters / CI. + + Can be removed once depends Boost is 1.71.0 or later. + +diff --git a/boost/process/detail/posix/wait_group.hpp b/boost/process/detail/posix/wait_group.hpp +index 9dc249803..2502d9772 100644 +--- a/boost/process/detail/posix/wait_group.hpp ++++ b/boost/process/detail/posix/wait_group.hpp +@@ -137,7 +137,6 @@ inline bool wait_until( + + do + { +- int ret_sig = 0; + int status; + if ((::waitpid(timeout_pid, &status, WNOHANG) != 0) + && (WIFEXITED(status) || WIFSIGNALED(status)))