From ef7d0a1f88121528bb2ac6ef1951f4c00412eba4 Mon Sep 17 00:00:00 2001 From: jeremy Date: Wed, 22 Jan 2014 20:39:04 +0000 Subject: [PATCH] Fix patch to set IP_MULTICAST_TTL socket option correctly. OK jasper@ --- audio/ruby-sonos/Makefile | 4 ++-- .../ruby-sonos/patches/patch-lib_sonos_discovery_rb | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/audio/ruby-sonos/Makefile b/audio/ruby-sonos/Makefile index 4a258b3c86a..a77f4cc7180 100644 --- a/audio/ruby-sonos/Makefile +++ b/audio/ruby-sonos/Makefile @@ -1,9 +1,9 @@ -# $OpenBSD: Makefile,v 1.2 2014/01/18 09:45:03 jasper Exp $ +# $OpenBSD: Makefile,v 1.3 2014/01/22 20:39:04 jeremy Exp $ COMMENT = control Sonos speakers with Ruby DISTNAME = sonos-0.3.4 -REVISION = 0 +REVISION = 1 CATEGORIES = audio net diff --git a/audio/ruby-sonos/patches/patch-lib_sonos_discovery_rb b/audio/ruby-sonos/patches/patch-lib_sonos_discovery_rb index d22bef33600..f14f473976c 100644 --- a/audio/ruby-sonos/patches/patch-lib_sonos_discovery_rb +++ b/audio/ruby-sonos/patches/patch-lib_sonos_discovery_rb @@ -1,16 +1,16 @@ -$OpenBSD: patch-lib_sonos_discovery_rb,v 1.1.1.1 2014/01/18 09:32:32 jasper Exp $ +$OpenBSD: patch-lib_sonos_discovery_rb,v 1.2 2014/01/22 20:39:04 jeremy Exp $ -XXX: emulate Linux' multicast TTL until either ruby or the kernel are -fixed to deal with unsigned char options, or to accept int options. +IP_MULTICAST_TTL socket option on OpenBSD currently doesn't accept +int, only unsigned char. ---- lib/sonos/discovery.rb.orig Fri Jan 17 15:09:37 2014 -+++ lib/sonos/discovery.rb Fri Jan 17 15:09:45 2014 +--- lib/sonos/discovery.rb.orig Wed Dec 31 16:00:00 1969 ++++ lib/sonos/discovery.rb Wed Jan 22 10:20:28 2014 @@ -75,7 +75,7 @@ module Sonos @socket = UDPSocket.open # We're going to use IP with the multicast TTL. Mystery third parameter is a mystery. - @socket.setsockopt(Socket::IPPROTO_IP, Socket::IP_MULTICAST_TTL, 2) -+ @socket.setsockopt(Socket::IPPROTO_IP, 33, 2) ++ @socket.setsockopt(Socket::Option.new(:INET, :IPPROTO_IP, :IP_MULTICAST_TTL, 2.chr)) end def search_message