$OpenBSD: patch-libgssdp_gssdp-socket-source_c,v 1.1.1.1 2011/07/04 15:18:31 jasper Exp $

From 31c9cabc36c6959ef43be63af047c9b6f8490632 Mon Sep 17 00:00:00 2001
From: Jens Georg <mail@jensge.org>
Date: Thu, 30 Jun 2011 21:51:11 +0200
Subject: [PATCH] Fix functionality on OpenBSD

https://bugzilla.gnome.org/show_bug.cgi?id=653775

From 8fb19991b891f3244367895db8935c51e331fe26 Mon Sep 17 00:00:00 2001
From: Jens Georg <mail@jensge.org>
Date: Thu, 30 Jun 2011 13:43:53 +0000
Subject: Add missing goto on error while setting TTL

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=653733

--- libgssdp/gssdp-socket-source.c.orig	Mon Jul  4 15:58:35 2011
+++ libgssdp/gssdp-socket-source.c	Mon Jul  4 15:58:37 2011
@@ -212,6 +212,7 @@ gssdp_socket_source_do_init (GInitable     *initable,
                                             inner_error,
                                             "Failed to set TTL");
 
+		goto error;
         }
         /* Set up additional things according to the type of socket desired */
         if (self->priv->type == GSSDP_SOCKET_SOURCE_TYPE_MULTICAST) {
@@ -250,7 +251,7 @@ gssdp_socket_source_do_init (GInitable     *initable,
                                                           SSDP_PORT);
         }
 
-#ifdef G_OS_WIN32
+#if defined(G_OS_WIN32) || defined (__OpenBSD__)
         /* normally g_socket_bind does this, but it is disabled on
          * windows since SO_REUSEADDR has different semantics
          * there. Nevertheless, there's no way without for
