The following patch appears necessary to get 1.14rc3 debian packages to
compile under Ubuntu precise. This applies two changes:
1. Correct error in version no. syntax in the debian/changelog
2. Allow code to compile with libubound versions < 1.4.21 i.e. when the
prototype for ub_ctx_add_ta was change - 2nd argument from char 8 to
const char *. Note: the macro UNBOUND_VERSION_MAJOR only seems to have
appeared in unbound.h from 1.4.21 onwards.
Tony Whyman
MWA
diff -rupN libreswan-3.14rc3.orig/debian/changelog
libreswan-3.14rc3/debian/changelog
--- libreswan-3.14rc3.orig/debian/changelog 2015-06-30
01:48:45.000000000 +0100
+++ libreswan-3.14rc3/debian/changelog 2015-07-04 23:38:12.671042000
+0100
@@ -1,4 +1,4 @@
-libreswan (1:v3.14~rc3-1) precise; urgency=low
+libreswan (1:3.14~rc3-1) precise; urgency=low
* Update to v3.14rc3-1
diff -rupN libreswan-3.14rc3.orig/lib/libswan/unbound.c
libreswan-3.14rc3/lib/libswan/unbound.c
--- libreswan-3.14rc3.orig/lib/libswan/unbound.c 2015-06-29
17:23:47.000000000 +0100
+++ libreswan-3.14rc3/lib/libswan/unbound.c 2015-07-04
23:38:03.943056000 +0100
@@ -87,7 +87,11 @@ bool unbound_init(struct ub_ctx *dnsctx)
DBG(DBG_DNS,
DBG_log("Loading root key:%s", rootanchor);
);
+#ifdef UNBOUND_VERSION_MAJOR
ugh = ub_ctx_add_ta(dnsctx, rootanchor);
+#else
+ ugh = ub_ctx_add_ta(dnsctx, (char*) rootanchor);
+#endif
if (ugh != 0) {
libreswan_log("error adding the DNSSEC root key: %s: %s",
ub_strerror(ugh), strerror(errno));
@@ -98,7 +102,11 @@ bool unbound_init(struct ub_ctx *dnsctx)
DBG(DBG_DNS,
DBG_log("Loading dlv key:%s", dlvanchor);
);
+#ifdef UNBOUND_VERSION_MAJOR
ugh = ub_ctx_set_option(dnsctx, "dlv-anchor:", dlvanchor);
+#else
+ ugh = ub_ctx_set_option(dnsctx, "dlv-anchor:",(char *) dlvanchor);
+#endif
if (ugh != 0) {
libreswan_log("error adding the DLV key: %s: %s",
ub_strerror(ugh), strerror(errno));
_______________________________________________
Swan mailing list
Swan@lists.libreswan.org
https://lists.libreswan.org/mailman/listinfo/swan