pkgsrc/multimedia/farsight2/patches/patch-aj
wiz 5daed441dc Update to 0.0.31.
Lots of bug fixes since 0.0.26.
2013-04-14 19:51:04 +00:00

40 lines
1.2 KiB
Text

$NetBSD: patch-aj,v 1.4 2013/04/14 19:51:05 wiz Exp $
--- gst-libs/gst/farsight/fs-interfaces.c.orig 2011-10-09 21:06:33.000000000 +0000
+++ gst-libs/gst/farsight/fs-interfaces.c
@@ -58,6 +58,10 @@ GST_DEBUG_CATEGORY_EXTERN (fs_base_confe
#include <sys/socket.h>
#include <ifaddrs.h>
#endif
+#include <netinet/in.h>
+#ifdef __sun
+#include <sys/sockio.h>
+#endif
/**
* fs_interfaces_get_local_interfaces:
@@ -326,8 +330,8 @@ gchar *
fs_interfaces_get_ip_for_interface (gchar *interface_name)
{
union {
- struct sockaddr s_addr;
- struct sockaddr_in sin_addr;
+ struct sockaddr u_s_addr;
+ struct sockaddr_in u_sin_addr;
} sockaddr_union;
struct ifreq ifr;
gint sockfd;
@@ -350,10 +354,10 @@ fs_interfaces_get_ip_for_interface (gcha
}
close (sockfd);
- sockaddr_union.s_addr = ifr.ifr_addr;
+ sockaddr_union.u_s_addr = ifr.ifr_addr;
GST_DEBUG ("Address for %s: %s", interface_name,
- inet_ntoa (sockaddr_union.sin_addr.sin_addr));
- return g_strdup (inet_ntoa (sockaddr_union.sin_addr.sin_addr));
+ inet_ntoa (sockaddr_union.u_sin_addr.sin_addr));
+ return g_strdup (inet_ntoa (sockaddr_union.u_sin_addr.sin_addr));
}
#else /* G_OS_UNIX */