summaryrefslogtreecommitdiffstats
path: root/main/musl/1001-add-rfc3678-mcast-structs.patch
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2013-10-14 08:07:10 +0000
committerTimo Teräs <timo.teras@iki.fi>2013-10-14 08:24:52 +0000
commit5720b17d34ac6a895d1d55824ee4bcaaffb7a152 (patch)
treee6a12e212313e31971a54f239d5cccb5fbb89866 /main/musl/1001-add-rfc3678-mcast-structs.patch
parent7b540827c88572c5c64d8309715c12b9943d8a96 (diff)
downloadaports-5720b17d34ac6a895d1d55824ee4bcaaffb7a152.tar.bz2
aports-5720b17d34ac6a895d1d55824ee4bcaaffb7a152.tar.xz
main/musl: add missing enums and functions for compatibility
Diffstat (limited to 'main/musl/1001-add-rfc3678-mcast-structs.patch')
-rw-r--r--main/musl/1001-add-rfc3678-mcast-structs.patch77
1 files changed, 77 insertions, 0 deletions
diff --git a/main/musl/1001-add-rfc3678-mcast-structs.patch b/main/musl/1001-add-rfc3678-mcast-structs.patch
new file mode 100644
index 000000000..c453d1403
--- /dev/null
+++ b/main/musl/1001-add-rfc3678-mcast-structs.patch
@@ -0,0 +1,77 @@
+From 6f47d853d3bab864020a4e2444aaaa3391ee308e Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Timo=20Ter=C3=A4s?= <timo.teras@iki.fi>
+Date: Wed, 31 Jul 2013 12:05:14 +0300
+Subject: [PATCH] add multicast structures from RFC 3678 to netinet/in.h
+
+and use _GNU_SOURCE || _BSD_SOURCE guards for all of the RFC 3678
+namespace polluting things like glibc/uclibc does.
+---
+ include/netinet/in.h | 43 ++++++++++++++++++++++++++++++++++++++++++-
+ 1 file changed, 42 insertions(+), 1 deletion(-)
+
+diff --git a/include/netinet/in.h b/include/netinet/in.h
+index d886fc2..b7a8a7a 100644
+--- a/include/netinet/in.h
++++ b/include/netinet/in.h
+@@ -204,7 +204,7 @@ uint16_t ntohs(uint16_t);
+ #define IP_MULTICAST_ALL 49
+ #define IP_UNICAST_IF 50
+
+-#ifdef _GNU_SOURCE
++#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
+ #define MCAST_JOIN_GROUP 42
+ #define MCAST_BLOCK_SOURCE 43
+ #define MCAST_UNBLOCK_SOURCE 44
+@@ -249,6 +249,47 @@ struct ip_mreqn
+ int imr_ifindex;
+ };
+
++struct ip_mreq_source {
++ struct in_addr imr_multiaddr;
++ struct in_addr imr_interface;
++ struct in_addr imr_sourceaddr;
++};
++
++struct ip_msfilter {
++ struct in_addr imsf_multiaddr;
++ struct in_addr imsf_interface;
++ uint32_t imsf_fmode;
++ uint32_t imsf_numsrc;
++ struct in_addr imsf_slist[1];
++};
++#define IP_MSFILTER_SIZE(numsrc) \
++ (sizeof(struct ip_msfilter) - sizeof(struct in_addr) \
++ + (numsrc) * sizeof(struct in_addr))
++
++#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
++struct group_req {
++ uint32_t gr_interface;
++ struct sockaddr_storage gr_group;
++};
++
++struct group_source_req {
++ uint32_t gsr_interface;
++ struct sockaddr_storage gsr_group;
++ struct sockaddr_storage gsr_source;
++};
++
++struct group_filter {
++ uint32_t gf_interface;
++ struct sockaddr_storage gf_group;
++ uint32_t gf_fmode;
++ uint32_t gf_numsrc;
++ struct sockaddr_storage gf_slist[1];
++};
++#define GROUP_FILTER_SIZE(numsrc) \
++ (sizeof(struct group_filter) - sizeof(struct sockaddr_storage) \
++ + (numsrc) * sizeof(struct sockaddr_storage))
++#endif
++
+ struct in_pktinfo
+ {
+ int ipi_ifindex;
+--
+1.8.3.3
+
+
+