Path: blob/main/cad/OrcaSlicer/files/patch-src_libslic3r_GCodeSender.cpp
34610 views
--- src/libslic3r/GCodeSender.cpp.orig 2025-10-02 17:32:12 UTC1+++ src/libslic3r/GCodeSender.cpp2@@ -8,7 +8,7 @@3#include <boost/date_time/posix_time/posix_time.hpp>4#include <boost/lexical_cast.hpp>56-#if defined(__APPLE__) || defined(__OpenBSD__)7+#if defined(__APPLE__) || defined(__OpenBSD__) || defined(__FreeBSD__)8#include <termios.h>9#endif10#ifdef __APPLE__11@@ -107,7 +107,7 @@ GCodeSender::connect(std::string devname, unsigned int12this->io.post(boost::bind(&GCodeSender::do_read, this));1314// start reading in the background thread15- boost::thread t(boost::bind(&boost::asio::io_service::run, &this->io));16+ boost::thread t(boost::bind(&boost::asio::io_context::run, &this->io));17this->background_thread.swap(t);1819// always send a M105 to check for connection because firmware might be silent on connect20@@ -146,7 +146,7 @@ GCodeSender::set_baud_rate(unsigned int baud_rate)21if (ioctl(handle, TCSETS2, &ios))22printf("Error in TCSETS2: %s\n", strerror(errno));2324-#elif __OpenBSD__25+#elif defined(__OpenBSD__) || defined(__FreeBSD__)26struct termios ios;27::tcgetattr(handle, &ios);28::cfsetspeed(&ios, baud_rate);293031