diff options
author | obache <obache@pkgsrc.org> | 2013-11-21 09:05:08 +0000 |
---|---|---|
committer | obache <obache@pkgsrc.org> | 2013-11-21 09:05:08 +0000 |
commit | bb00eba4876a94d89444cc264703a9f297b7cced (patch) | |
tree | a7606f5d2b02110abffcb1455b370d1f18ac2fc7 | |
parent | 39511f18ff284462d4d86e583ca852cdab210923 (diff) | |
download | pkgsrc-bb00eba4876a94d89444cc264703a9f297b7cced.tar.gz |
fixes build on Solaris.
-rw-r--r-- | multimedia/gmediaserver/distinfo | 4 | ||||
-rw-r--r-- | multimedia/gmediaserver/patches/patch-src_upnp.c | 26 |
2 files changed, 23 insertions, 7 deletions
diff --git a/multimedia/gmediaserver/distinfo b/multimedia/gmediaserver/distinfo index b9e8848b92f..17161174e7b 100644 --- a/multimedia/gmediaserver/distinfo +++ b/multimedia/gmediaserver/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.3 2012/04/13 23:52:11 obache Exp $ +$NetBSD: distinfo,v 1.4 2013/11/21 09:05:08 obache Exp $ SHA1 (gmediaserver-0.13.0.tar.gz) = 5b868bc3c3d3bf0c2c550a4fc618c586a2640799 RMD160 (gmediaserver-0.13.0.tar.gz) = 57fb849172d28e8adcff2234c787d552c16bde9a @@ -6,4 +6,4 @@ Size (gmediaserver-0.13.0.tar.gz) = 668281 bytes SHA1 (patch-aa) = 8913274c78c646a3dd3e26a0b33d309697302eb9 SHA1 (patch-ab) = 09b60dc2cfed813d823f3b6bfeffd5bdc4d14037 SHA1 (patch-src_contentdir.c) = 8269681895e5c9aa72f53d5251a6049c690dd11f -SHA1 (patch-src_upnp.c) = 013fa7a7072c7d7731cad6c12dfa408838daf5c1 +SHA1 (patch-src_upnp.c) = 8d4f66f1aa45b14d1011e306e459100a80c0b538 diff --git a/multimedia/gmediaserver/patches/patch-src_upnp.c b/multimedia/gmediaserver/patches/patch-src_upnp.c index 059debf7f1e..17b0c6d6f4b 100644 --- a/multimedia/gmediaserver/patches/patch-src_upnp.c +++ b/multimedia/gmediaserver/patches/patch-src_upnp.c @@ -1,4 +1,4 @@ -$NetBSD: patch-src_upnp.c,v 1.1 2012/04/13 23:52:11 obache Exp $ +$NetBSD: patch-src_upnp.c,v 1.2 2013/11/21 09:05:08 obache Exp $ * API change for libupnp>=1.6.7 @@ -12,7 +12,7 @@ $NetBSD: patch-src_upnp.c,v 1.1 2012/04/13 23:52:11 obache Exp $ #include <inttypes.h> /* POSIX */ #include "gettext.h" /* Gnulib/gettext */ #define _(s) gettext(s) -@@ -61,6 +62,16 @@ static Service services[] = { +@@ -61,6 +62,32 @@ static Service services[] = { { 0, } }; @@ -21,7 +21,23 @@ $NetBSD: patch-src_upnp.c,v 1.1 2012/04/13 23:52:11 obache Exp $ +{ + char hbuf[NI_MAXHOST]; + int err; -+ err = getnameinfo((struct sockaddr*)addr, addr->ss_len, hbuf, NI_MAXHOST, ++ int slen; ++#ifdef __sun ++ switch (addr->ss_family) { ++ case AF_INET: ++ slen = sizeof (struct sockaddr_in); ++ break; ++ case AF_INET6: ++ slen = sizeof (struct sockaddr_in6); ++ break; ++ default: ++ slen = sizeof(*addr); ++ break; ++ } ++#else ++ slen = addr->ss_len; ++#endif ++ err = getnameinfo((struct sockaddr*)addr, slen, hbuf, NI_MAXHOST, + NULL, 0, NI_NUMERICHOST); + say(level, header, err == 0 ? hbuf : "(unknown)"); +} @@ -29,7 +45,7 @@ $NetBSD: patch-src_upnp.c,v 1.1 2012/04/13 23:52:11 obache Exp $ static const char * upnp_errmsg(int res) { -@@ -265,7 +276,7 @@ handle_get_var_request(struct Upnp_State +@@ -265,7 +292,7 @@ handle_get_var_request(struct Upnp_State say(3, _("Event device UDN: %s\n"), quotearg(request->DevUDN)); say(3, _("Event service ID: %s\n"), quotearg(request->ServiceID)); say(3, _("Event variable name: %s\n"), quotearg(request->StateVarName)); @@ -38,7 +54,7 @@ $NetBSD: patch-src_upnp.c,v 1.1 2012/04/13 23:52:11 obache Exp $ if (strcmp(request->DevUDN, device_udn) != 0) { say(1, _("Discarding event - event device UDN (%s) not recognized\n"), quotearg(request->DevUDN)); -@@ -306,7 +317,7 @@ handle_action_request(struct Upnp_Action +@@ -306,7 +333,7 @@ handle_action_request(struct Upnp_Action say(3, _("Event device UDN: %s\n"), quotearg(request->DevUDN)); say(3, _("Event service ID: %s\n"), quotearg(request->ServiceID)); say(3, _("Event action name: %s\n"), quotearg(request->ActionName)); |