aboutsummaryrefslogtreecommitdiff
path: root/multimedia/libhdhomerun
diff options
context:
space:
mode:
authorKubilay Kocak <koobs@FreeBSD.org>2019-10-01 03:23:17 +0000
committerKubilay Kocak <koobs@FreeBSD.org>2019-10-01 03:23:17 +0000
commit41e4b588f578d9f99a7bbdfde7f7756773360034 (patch)
tree979de8684cc2caa8c95ca20a79a07637b5dbf58f /multimedia/libhdhomerun
parent2b96ae02da71ee45f4a04a53421ca7f0c5c82230 (diff)
downloadports-41e4b588f578d9f99a7bbdfde7f7756773360034.tar.gz
ports-41e4b588f578d9f99a7bbdfde7f7756773360034.zip
Notes
Diffstat (limited to 'multimedia/libhdhomerun')
-rw-r--r--multimedia/libhdhomerun/Makefile1
-rw-r--r--multimedia/libhdhomerun/files/patch-hdhomerun__discover.c35
2 files changed, 36 insertions, 0 deletions
diff --git a/multimedia/libhdhomerun/Makefile b/multimedia/libhdhomerun/Makefile
index fbe39de488b1..97d9a764ef8e 100644
--- a/multimedia/libhdhomerun/Makefile
+++ b/multimedia/libhdhomerun/Makefile
@@ -2,6 +2,7 @@
PORTNAME= libhdhomerun
PORTVERSION= 20190621
+PORTREVISION= 1
CATEGORIES= multimedia
MASTER_SITES= https://download.silicondust.com/hdhomerun/
DISTNAME= ${PORTNAME}_${PORTVERSION}
diff --git a/multimedia/libhdhomerun/files/patch-hdhomerun__discover.c b/multimedia/libhdhomerun/files/patch-hdhomerun__discover.c
new file mode 100644
index 000000000000..088440edc395
--- /dev/null
+++ b/multimedia/libhdhomerun/files/patch-hdhomerun__discover.c
@@ -0,0 +1,35 @@
+# Backport FreeBSD broadcast patch
+# https://github.com/Silicondust/libhdhomerun/commit/b0e5d5f5c8e2bf37dea34beb014e08ebb598ebf6
+
+--- hdhomerun_discover.c.orig 2019-09-30 16:45:23 UTC
++++ hdhomerun_discover.c
+@@ -183,7 +183,8 @@ static bool hdhomerun_discover_send(struct hdhomerun_d
+ unsigned int i;
+ for (i = 1; i < ds->sock_count; i++) {
+ struct hdhomerun_discover_sock_t *dss = &ds->socks[i];
+-
++ uint32_t send_ip = target_ip;
++
+ if (target_ip != 0xFFFFFFFF) {
+ if (dss->subnet_mask == 0) {
+ continue;
+@@ -193,7 +194,18 @@ static bool hdhomerun_discover_send(struct hdhomerun_d
+ }
+ }
+
+- result |= hdhomerun_discover_send_internal(ds, dss, target_ip, device_type, device_id);
++#if defined(IP_ONESBCAST)
++ /* FreeBSD special handling - send subnet broadcast */
++ if (target_ip == 0xFFFFFFFF) {
++ send_ip = dss->local_ip | ~dss->subnet_mask;
++
++ if ((send_ip == 0x00000000) || (send_ip == 0xFFFFFFFF)) {
++ continue;
++ }
++ }
++#endif
++
++ result |= hdhomerun_discover_send_internal(ds, dss, send_ip, device_type, device_id);
+ }
+
+ /*