From 16f08410fac103d5ff8af38468f46859a4b81de4 Mon Sep 17 00:00:00 2001 From: Dmitry Marakasov Date: Fri, 15 Jan 2021 00:24:11 +0000 Subject: - Update to 2.3.0 [1] - Some port cleanup [2] - Whitespace fixes - Remove duplicate and unused depends - Add missing depends - Use WX_CONFIG properly - Support FHS - Switch to PORTDATA - Install .desktop files into proper location - Fix compatibility with 11.x PR: 252611 Submitted by: teodorsigaev@gmail.com (maintainer) [1], amdmi3 [2] --- .../files/patch-src_libslic3r_Thread.cpp | 46 ++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 cad/PrusaSlicer/files/patch-src_libslic3r_Thread.cpp (limited to 'cad/PrusaSlicer/files/patch-src_libslic3r_Thread.cpp') diff --git a/cad/PrusaSlicer/files/patch-src_libslic3r_Thread.cpp b/cad/PrusaSlicer/files/patch-src_libslic3r_Thread.cpp new file mode 100644 index 000000000000..d48272fed2fe --- /dev/null +++ b/cad/PrusaSlicer/files/patch-src_libslic3r_Thread.cpp @@ -0,0 +1,46 @@ +Note that this patch may be removed after FreeBSD 11.x EoL +as latest FreeBSD versions have proper +pthread_setname_np/pthread_getname_np support. + +--- src/libslic3r/Thread.cpp.orig 2021-01-11 13:01:51 UTC ++++ src/libslic3r/Thread.cpp +@@ -4,6 +4,7 @@ + #else + // any posix system + #include ++ #include + #endif + + #include +@@ -161,26 +162,27 @@ std::optional get_current_thread_name() + // posix + bool set_thread_name(std::thread &thread, const char *thread_name) + { +- pthread_setname_np(thread.native_handle(), thread_name); ++ pthread_set_name_np(thread.native_handle(), thread_name); + return true; + } + + bool set_thread_name(boost::thread &thread, const char *thread_name) + { +- pthread_setname_np(thread.native_handle(), thread_name); ++ pthread_set_name_np(thread.native_handle(), thread_name); + return true; + } + + bool set_current_thread_name(const char *thread_name) + { +- pthread_setname_np(pthread_self(), thread_name); ++ pthread_set_name_np(pthread_self(), thread_name); + return true; + } + + std::optional get_current_thread_name() + { + char buf[16]; +- return std::string(pthread_getname_np(pthread_self(), buf, 16) == 0 ? buf : ""); ++ pthread_get_name_np(pthread_self(), buf, 16); ++ return std::string(buf); + } + + #endif -- cgit v1.2.3