summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVlad Glagolev2012-11-21 17:53:39 +0400
committerVlad Glagolev2012-11-21 17:53:39 +0400
commit46cb7d5d4016798348b7f831624763d5553fad9e (patch)
tree2cf699c908f59c6e57c1106133ee5331c0f7c17e
parentc831dfeba37e3bf155ee629668e149ba41d301cd (diff)
chrony: fixed build without IPv6 support
-rw-r--r--net/chrony/HISTORY4
-rwxr-xr-xnet/chrony/PRE_BUILD4
-rw-r--r--net/chrony/no-ipv6.patch20
3 files changed, 28 insertions, 0 deletions
diff --git a/net/chrony/HISTORY b/net/chrony/HISTORY
index d08d368c8e..b026b83d4c 100644
--- a/net/chrony/HISTORY
+++ b/net/chrony/HISTORY
@@ -1,3 +1,7 @@
+2012-11-21 Vlad Glagolev <stealth@sourcemage.org>
+ * PRE_BUILD: added, to apply the patch
+ * no-ipv6.patch: added, to fix build without IPv6 support
+
2011-10-14 Bor Kraljič <pyrobor@ver.si>
* DETAILS: fixed long description wrap (scripted)
diff --git a/net/chrony/PRE_BUILD b/net/chrony/PRE_BUILD
new file mode 100755
index 0000000000..25482b9361
--- /dev/null
+++ b/net/chrony/PRE_BUILD
@@ -0,0 +1,4 @@
+default_pre_build &&
+cd "$SOURCE_DIRECTORY" &&
+
+patch -p0 < "$SPELL_DIRECTORY/no-ipv6.patch"
diff --git a/net/chrony/no-ipv6.patch b/net/chrony/no-ipv6.patch
new file mode 100644
index 0000000000..0f13a0f9af
--- /dev/null
+++ b/net/chrony/no-ipv6.patch
@@ -0,0 +1,20 @@
+--- ntp_io.c.orig 2011-07-13 16:55:28.000000000 +0400
++++ ntp_io.c 2012-11-21 17:44:29.000000000 +0400
+@@ -355,7 +355,7 @@
+ }
+ #endif
+
+-#ifdef IPV6_PKTINFO
++#if defined(IPV6_PKTINFO) && defined(HAVE_IPV6)
+ if (cmsg->cmsg_level == IPPROTO_IPV6 && cmsg->cmsg_type == IPV6_PKTINFO) {
+ struct in6_pktinfo ipi;
+
+@@ -466,7 +466,7 @@
+ }
+ #endif
+
+-#ifdef IPV6_PKTINFO
++#if defined(IPV6_PKTINFO) && defined(HAVE_IPV6)
+ if (remote_addr->local_ip_addr.family == IPADDR_INET6) {
+ struct cmsghdr *cmsg;
+ struct in6_pktinfo *ipi;