File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -176,6 +176,7 @@ else()
176176endif ()
177177
178178if (build_with_zeroconf)
179+ add_compile_definitions (SOSC_ZEROCONF )
179180 target_sources (serialosc-device PRIVATE src/serialosc-device/zeroconf/common.c )
180181
181182 if (LINUX )
@@ -188,7 +189,6 @@ if(build_with_zeroconf)
188189 target_sources (serialosc-device PRIVATE src/serialosc-device/zeroconf/windows.c )
189190 endif ()
190191else ()
191- add_compile_definitions (SOSC_NO_ZEROCONF )
192192 target_sources (serialosc-device PRIVATE src/serialosc-device/zeroconf/dummy.c )
193193endif ()
194194
Original file line number Diff line number Diff line change 2020#include <winsock2.h>
2121#endif
2222
23- #ifndef SOSC_NO_ZEROCONF
23+ #ifdef SOSC_ZEROCONF
2424#include <dns_sd.h>
2525#endif
2626
@@ -61,7 +61,7 @@ typedef struct sosc_state {
6161 int ipc_in_fd ;
6262 int ipc_out_fd ;
6363
64- #ifndef SOSC_NO_ZEROCONF
64+ #ifdef SOSC_ZEROCONF
6565 DNSServiceRef ref ;
6666#endif
6767
Original file line number Diff line number Diff line change @@ -6,9 +6,7 @@ def build(ctx):
66 objs = []
77 obj = lambda src : objs .append (src )
88
9- if ctx .env .SOSC_NO_ZEROCONF :
10- obj ('zeroconf/dummy.c' )
11- else :
9+ if ctx .env .SOSC_ZEROCONF :
1210 obj ('zeroconf/common.c' )
1311
1412 if ctx .env .DEST_OS [:3 ] == "win" :
@@ -17,6 +15,8 @@ def build(ctx):
1715 obj ('zeroconf/not_darwin.c' )
1816 elif ctx .env .DEST_OS == 'darwin' :
1917 obj ('zeroconf/darwin.c' )
18+ else :
19+ obj ('zeroconf/dummy.c' )
2020
2121 if ctx .env .DEST_OS [:3 ] == "win" :
2222 obj ('event_loop/windows.c' )
Original file line number Diff line number Diff line change @@ -275,9 +275,9 @@ def configure(conf):
275275 conf .env .append_unique ("CFLAGS" , ["-mmacosx-version-min=10.13" ])
276276 conf .env .append_unique ("LINKFLAGS" , ["-mmacosx-version-min=10.13" ])
277277
278- if conf .options .disable_zeroconf :
279- conf .define ("SOSC_NO_ZEROCONF " , True )
280- conf .env .SOSC_NO_ZEROCONF = True
278+ if not conf .options .disable_zeroconf :
279+ conf .define ("SOSC_ZEROCONF " , True )
280+ conf .env .SOSC_ZEROCONF = True
281281
282282
283283 if conf .options .enable_debug :
You can’t perform that action at this time.
0 commit comments