From 97167ed927099de8a9d7c331610003ac4d25cdac Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Fri, 7 May 2021 01:45:00 +0200 Subject: [PATCH] Fix harvid bind address on BigSur --- gtk2_ardour/video_server_dialog.cc | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/gtk2_ardour/video_server_dialog.cc b/gtk2_ardour/video_server_dialog.cc index c3f37c396a..deb9115ef4 100644 --- a/gtk2_ardour/video_server_dialog.cc +++ b/gtk2_ardour/video_server_dialog.cc @@ -47,6 +47,10 @@ #include #endif +#ifdef __APPLE__ +extern int query_darwin_version (); // cocoacarbon.mm +#endif + using namespace Gtk; using namespace std; using namespace PBD; @@ -83,12 +87,20 @@ VideoServerDialog::VideoServerDialog (Session* s) docroot_entry.set_width_chars(38); docroot_entry.set_text(video_get_docroot (Config)); -#ifndef __APPLE__ - /* Note: on OSX icsd is not able to bind to IPv4 localhost */ listenaddr_combo.append_text("127.0.0.1"); -#endif listenaddr_combo.append_text("0.0.0.0"); +#ifdef __APPLE__ + /* Note: on OSX icsd is not able to bind to IPv4 localhost, + * except on bigsur where 0.0.0.0 works + */ + if (query_darwin_version () >= 20) { + listenaddr_combo.set_active(1); + } else { + listenaddr_combo.set_active(0); + } +#else listenaddr_combo.set_active(0); +#endif std::string harvid_exe; if (ArdourVideoToolPaths::harvid_exe(harvid_exe)) {