aboutsummaryrefslogtreecommitdiffhomepage
path: root/backends
diff options
context:
space:
mode:
Diffstat (limited to 'backends')
-rw-r--r--backends/Makefile5
-rw-r--r--backends/artnet.c2
-rw-r--r--backends/sacn.c2
-rw-r--r--backends/visca.c16
4 files changed, 18 insertions, 7 deletions
diff --git a/backends/Makefile b/backends/Makefile
index be870d6..35782ab 100644
--- a/backends/Makefile
+++ b/backends/Makefile
@@ -60,7 +60,10 @@ openpixelcontrol.dll: ADDITIONAL_OBJS += $(BACKEND_LIB)
openpixelcontrol.dll: LDLIBS += -lws2_32
maweb.so: ADDITIONAL_OBJS += $(BACKEND_LIB)
-maweb.so: LDLIBS = $(shell pkg-config --libs openssl || echo "-DBUILD_ERROR=\"Missing pkg-config data for openssl\"")
+# On OSX, the system provides libressl but no pkg-config data.
+# Brew provides OpenSSL v1.1, but with a mangled path and no clear way to find it
+# Give up and just default to -lcrypto for the time being...
+maweb.so: LDLIBS = $(shell pkg-config --libs openssl || echo "-lcrypto")
maweb.dll: ADDITIONAL_OBJS += $(BACKEND_LIB)
maweb.dll: LDLIBS += -lws2_32
maweb.dll: CFLAGS += -DMAWEB_NO_LIBSSL
diff --git a/backends/artnet.c b/backends/artnet.c
index dae9ba3..7c5f7e0 100644
--- a/backends/artnet.c
+++ b/backends/artnet.c
@@ -429,7 +429,7 @@ static int artnet_handle(size_t num, managed_fd* fds){
LOG("Failed to process frame");
}
else if(!inst && global_cfg.detect > 1){
- LOGPF("Received data for unconfigured universe %d (net %d) on descriptor %" PRIsize_t, frame->universe, frame->net, (((uint64_t) fds[u].impl) & 0xFF));
+ LOGPF("Received data for unconfigured universe %d (net %d) on descriptor %" PRIu64, frame->universe, frame->net, (((uint64_t) fds[u].impl) & 0xFF));
}
}
}
diff --git a/backends/sacn.c b/backends/sacn.c
index e395ae2..5c5b81d 100644
--- a/backends/sacn.c
+++ b/backends/sacn.c
@@ -613,7 +613,7 @@ static int sacn_handle(size_t num, managed_fd* fds){
}
else if(!inst && global_cfg.detect > 1){
//this will only happen with unicast input
- LOGPF("Received data for unconfigured universe %d on descriptor %" PRIsize_t, be16toh(data->universe), ((uint64_t) fds[u].impl) & 0xFFFF);
+ LOGPF("Received data for unconfigured universe %d on descriptor %" PRIu64, be16toh(data->universe), ((uint64_t) fds[u].impl) & 0xFFFF);
}
}
}
diff --git a/backends/visca.c b/backends/visca.c
index a36b139..6ae14d9 100644
--- a/backends/visca.c
+++ b/backends/visca.c
@@ -4,9 +4,12 @@
#include <string.h>
#include <math.h>
-#ifndef _WIN32
+#ifdef __linux__
#include <sys/ioctl.h>
#include <asm/termbits.h>
+#elif __APPLE__
+ #include <sys/ioctl.h>
+ #include <IOKit/serial/ioss.h>
#endif
#include "visca.h"
@@ -89,9 +92,6 @@ static int ptz_configure_instance(instance* inst, char* option, char* value){
LOG("Direct device connections are not possible on Windows");
return 1;
#else
-
- struct termios2 device_config;
-
options = strchr(value, ' ');
if(options){
//terminate port name
@@ -108,6 +108,8 @@ static int ptz_configure_instance(instance* inst, char* option, char* value){
//configure baudrate
if(options){
+ #ifdef __linux__
+ struct termios2 device_config;
//get current port config
if(ioctl(data->fd, TCGETS2, &device_config)){
LOGPF("Failed to get port configuration data for %s: %s", value, strerror(errno));
@@ -123,6 +125,12 @@ static int ptz_configure_instance(instance* inst, char* option, char* value){
if(ioctl(data->fd, TCSETS2, &device_config)){
LOGPF("Failed to set port configuration data for %s: %s", value, strerror(errno));
}
+ #elif __APPLE__
+ speed_t speed = strtoul(options, NULL, 10);
+ if(ioctl(data->fd, IOSSIOSPEED, &speed)){
+ LOGPF("Failed to set port configuration data for %s: %s", value, strerror(errno));
+ }
+ #endif
}
return 0;
#endif