From 37f0119fa2a53c44809043846620e266da92d991 Mon Sep 17 00:00:00 2001 From: cbdev Date: Fri, 23 Mar 2018 13:45:47 +0100 Subject: Fix bug in universe discovery packet --- Makefile | 2 ++ backends/sacn.c | 2 +- portability.h | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 0de531c..60534ba 100644 --- a/Makefile +++ b/Makefile @@ -13,7 +13,9 @@ all: midimonster backends backends: $(MAKE) -C backends +# This rule can not be the default rule because OSX the target prereqs are not exactly the build prereqs midimonster: midimonster.c portability.h $(OBJS) + $(CC) $(CFLAGS) $(LDFLAGS) $< $(OBJS) $(LDLIBS) -o $@ clean: $(RM) midimonster diff --git a/backends/sacn.c b/backends/sacn.c index a0ac493..fde8d90 100644 --- a/backends/sacn.c +++ b/backends/sacn.c @@ -498,7 +498,7 @@ static void sacn_discovery(size_t fd){ size_t page = 0, pages = (global_cfg.fd[fd].universes / 512) + 1, universes; struct sockaddr_in discovery_dest = { .sin_family = AF_INET, - .sin_port = htobe16(SACN_PORT), + .sin_port = htobe16(strtoul(SACN_PORT, NULL, 10)), .sin_addr.s_addr = htobe32(((uint32_t) 0xefff0000) | 64214) }; diff --git a/portability.h b/portability.h index e60446d..71d72fc 100644 --- a/portability.h +++ b/portability.h @@ -1,5 +1,5 @@ #ifdef __APPLE__ - #define CLOCK_MONOTONIC_RAW CLOCK_MONOTONIC_COARSE + #define CLOCK_MONOTONIC_RAW _CLOCK_MONOTONIC_RAW #include #define htobe16(x) OSSwapHostToBigInt16(x) -- cgit v1.2.3