diff options
author | minskim <minskim@pkgsrc.org> | 2018-05-06 18:56:35 +0000 |
---|---|---|
committer | minskim <minskim@pkgsrc.org> | 2018-05-06 18:56:35 +0000 |
commit | b587c2a9eafc850d61c5a6375eb1fe940df8d3da (patch) | |
tree | cbff916df2e0194bc33579a89ed3327869e21f6a /meta-pkgs | |
parent | 7c82d9146451032c9cbef90ca26fdb883ca92817 (diff) | |
download | pkgsrc-b587c2a9eafc850d61c5a6375eb1fe940df8d3da.tar.gz |
devel/boost-libs: Make fiber compiles on FreeBSD
https://github.com/boostorg/fiber/commit/225b0d75
Diffstat (limited to 'meta-pkgs')
-rw-r--r-- | meta-pkgs/boost/distinfo | 4 | ||||
-rw-r--r-- | meta-pkgs/boost/patches/patch-libs_fiber_src_numa_freebsd_pin__thread.cpp | 48 |
2 files changed, 50 insertions, 2 deletions
diff --git a/meta-pkgs/boost/distinfo b/meta-pkgs/boost/distinfo index d9ecd7e55d7..65235a0cc4b 100644 --- a/meta-pkgs/boost/distinfo +++ b/meta-pkgs/boost/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.118 2018/05/06 18:46:09 minskim Exp $ +$NetBSD: distinfo,v 1.119 2018/05/06 18:56:35 minskim Exp $ SHA1 (boost_1_67_0.tar.bz2) = 694ae3f4f899d1a80eb7a3b31b33be73c423c1ae RMD160 (boost_1_67_0.tar.bz2) = d5bf97b8a953b87c08e367556856204a05346315 @@ -25,12 +25,12 @@ SHA1 (patch-boost_stacktrace_detail_collect__unwind.ipp) = a0e9722872121ddc0db6b SHA1 (patch-boost_stacktrace_detail_frame__unwind.ipp) = 0b06b1a1b28decbe61a6f6891b91c6751ff647e1 SHA1 (patch-boost_stacktrace_detail_location__from__symbol.hpp) = 860bfd99ffce4f6462683fc344d43850632cb6c1 SHA1 (patch-boost_test_impl_execution__monitor.ipp) = 573e2c8a4575ce1fc50338ddff0968e1c3ed1a61 -SHA1 (patch-boost_wave_cpplexer_re2clex_cpp__re.hpp) = 3f8c14994e68b9aa0efbfc9153e20e9285938d2f SHA1 (patch-boostcpp.jam) = f624d0bede17c61de9758033705eaff94d42775b SHA1 (patch-libs_config_configure) = e2f204d4fa4f1bd9b4131d28f9be0a1ac22bf711 SHA1 (patch-libs_config_test_boost__no__range__based__for.ipp) = d9936c472fc2c696d86522b36eb12813ae91bee4 SHA1 (patch-libs_context_src_asm_jump_arm_aapcs_elf_gas.S) = 644ecdae0f72fc02a529cd432f9261fb31e9b4e3 SHA1 (patch-libs_context_src_asm_ontop_arm_aapcs_elf_gas.S) = 2ae88227308ee9332fb01ece870eb22fb8383756 SHA1 (patch-libs_fiber_build_Jamfile.v2) = 28c1aba2d074f2db7104e37cd900d33f5fcffb09 +SHA1 (patch-libs_fiber_src_numa_freebsd_pin__thread.cpp) = 0fbc6c9bcc17a4e042f3b62ca5fdf33f014cf773 SHA1 (patch-tools_build_src_engine_build.jam) = dc59422ade217aa49eb5d6928f02f7bc4734aa43 SHA1 (patch-tools_build_src_engine_build.sh) = ed5e29d049f04e8a1e055844e66c549e5cd4bb01 diff --git a/meta-pkgs/boost/patches/patch-libs_fiber_src_numa_freebsd_pin__thread.cpp b/meta-pkgs/boost/patches/patch-libs_fiber_src_numa_freebsd_pin__thread.cpp new file mode 100644 index 00000000000..6ad0b8ae456 --- /dev/null +++ b/meta-pkgs/boost/patches/patch-libs_fiber_src_numa_freebsd_pin__thread.cpp @@ -0,0 +1,48 @@ +$NetBSD: patch-libs_fiber_src_numa_freebsd_pin__thread.cpp,v 1.1 2018/05/06 18:56:35 minskim Exp $ + +Use pthread_setaffinity_np() on FreeBSD. + +https://github.com/boostorg/fiber/commit/225b0d75 + +--- libs/fiber/src/numa/freebsd/pin_thread.cpp.orig 2018-04-11 13:49:02.000000000 +0000 ++++ libs/fiber/src/numa/freebsd/pin_thread.cpp +@@ -7,10 +7,8 @@ + #include "boost/fiber/numa/pin_thread.hpp" + + extern "C" { +-#include <errno.h> +-#include <sys/param.h> +-#include <sys/cpuset.h> +-#include <sys/thread.h> ++#include <pthread.h> ++#include <pthread_np.h> + } + + #include <system_error> +@@ -25,18 +23,19 @@ namespace numa { + + BOOST_FIBERS_DECL + void pin_thread( std::uint32_t cpuid) { +- pin_thread( cpuid, ::thr_self() ); ++ pin_thread( cpuid, ::pthread_self() ); + } + + BOOST_FIBERS_DECL + void pin_thread( std::uint32_t cpuid, std::thread::native_handle_type h) { +- cpuset_t mask; +- CPU_ZERO( & mask); +- CPU_SET( cpuid, & mask); +- if ( BOOST_UNLIKELY( 0 != ::cpuset_setaffinity( CPU_LEVEL_WHICH, CPU_WHICH_TID, h, sizeof( mask), & mask) ) ) { ++ cpuset_t set; ++ CPU_ZERO( & set); ++ CPU_SET( cpuid, & set); ++ int err = 0; ++ if ( BOOST_UNLIKELY( 0 != ( err = ::pthread_setaffinity_np( h, sizeof( set), & set) ) ) ) { + throw std::system_error( +- std::error_code( errno, std::system_category() ), +- "::cpuset_setaffinity() failed"); ++ std::error_code( err, std::system_category() ), ++ "pthread_setaffinity_np() failed"); + } + } + |