p7zip: assorted fixes
[oi-userland.git] / components / encumbered / minidlna / patches / 02-minissdp.c.patch
blob39ad274c352c51610784b0250da42c1c3b2835b6
1 --- minidlna-1.3.3/minissdp.c.orig
2 +++ minidlna-1.3.3/minissdp.c
3 @@ -107,14 +107,14 @@
5 if (setsockopt(s, SOL_SOCKET, SO_REUSEADDR, &i, sizeof(i)) < 0)
6 DPRINTF(E_WARN, L_SSDP, "setsockopt(udp, SO_REUSEADDR): %s\n", strerror(errno));
7 -#ifdef __linux__
8 +#ifdef __unix__
9 if (setsockopt(s, IPPROTO_IP, IP_PKTINFO, &i, sizeof(i)) < 0)
10 DPRINTF(E_WARN, L_SSDP, "setsockopt(udp, IP_PKTINFO): %s\n", strerror(errno));
11 #endif
12 memset(&sockname, 0, sizeof(struct sockaddr_in));
13 sockname.sin_family = AF_INET;
14 sockname.sin_port = htons(SSDP_PORT);
15 -#ifdef __linux__
16 +#ifdef __unix__
17 /* NOTE: Binding a socket to a UDP multicast address means, that we just want
18 * to receive datagramms send to this multicast address.
19 * To specify the local nics we want to use we have to use setsockopt,
20 @@ -502,7 +502,7 @@
21 char *st = NULL, *mx = NULL, *man = NULL, *mx_end = NULL;
22 int man_len = 0;
23 socklen_t len_r = sizeof(struct sockaddr_in);
24 -#ifdef __linux__
25 +#ifdef __unix__
26 char cmbuf[CMSG_SPACE(sizeof(struct in_pktinfo))];
27 struct iovec iovec = {
28 .iov_base = bufr,
29 @@ -663,7 +663,7 @@
30 else if (st && (st_len > 0))
32 int l;
33 -#ifdef __linux__
34 +#ifdef __unix__
35 char host[40] = "127.0.0.1";
36 struct cmsghdr *cmsg;