Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
freebsd
GitHub Repository: freebsd/freebsd-ports-kde
Path: blob/main/cad/OrcaSlicer/files/patch-src_libslic3r_GCodeSender.cpp
34610 views
1
--- src/libslic3r/GCodeSender.cpp.orig 2025-10-02 17:32:12 UTC
2
+++ src/libslic3r/GCodeSender.cpp
3
@@ -8,7 +8,7 @@
4
#include <boost/date_time/posix_time/posix_time.hpp>
5
#include <boost/lexical_cast.hpp>
6
7
-#if defined(__APPLE__) || defined(__OpenBSD__)
8
+#if defined(__APPLE__) || defined(__OpenBSD__) || defined(__FreeBSD__)
9
#include <termios.h>
10
#endif
11
#ifdef __APPLE__
12
@@ -107,7 +107,7 @@ GCodeSender::connect(std::string devname, unsigned int
13
this->io.post(boost::bind(&GCodeSender::do_read, this));
14
15
// start reading in the background thread
16
- boost::thread t(boost::bind(&boost::asio::io_service::run, &this->io));
17
+ boost::thread t(boost::bind(&boost::asio::io_context::run, &this->io));
18
this->background_thread.swap(t);
19
20
// always send a M105 to check for connection because firmware might be silent on connect
21
@@ -146,7 +146,7 @@ GCodeSender::set_baud_rate(unsigned int baud_rate)
22
if (ioctl(handle, TCSETS2, &ios))
23
printf("Error in TCSETS2: %s\n", strerror(errno));
24
25
-#elif __OpenBSD__
26
+#elif defined(__OpenBSD__) || defined(__FreeBSD__)
27
struct termios ios;
28
::tcgetattr(handle, &ios);
29
::cfsetspeed(&ios, baud_rate);
30
31