Patchwork [v4,2/2] strongswan: fix build without IPv6 support

login
register
mail settings
Submitter Jérôme Pouiller
Date Feb. 14, 2013, 3:10 p.m.
Message ID <1360854606-13787-2-git-send-email-jezz@sysmic.org>
Download mbox | patch
Permalink /patch/220465/
State Superseded
Headers show

Comments

Jérôme Pouiller - Feb. 14, 2013, 3:10 p.m.
Disable kernel-netlink and socket-default features if toolchain does not
support IPv6. Also add a comment for this case.

Signed-off-by: Jérôme Pouiller <jezz@sysmic.org>
---
 package/strongswan/Config.in     |    6 ++++++
 package/strongswan/strongswan.mk |    4 +++-
 2 files changed, 9 insertions(+), 1 deletion(-)
Gustavo Zacarias - March 24, 2013, 2:31 p.m.
On 02/14/2013 12:10 PM, Jérôme Pouiller wrote:

> Disable kernel-netlink and socket-default features if toolchain does not
> support IPv6. Also add a comment for this case.
> 
> Signed-off-by: Jérôme Pouiller <jezz@sysmic.org>

You could fold this patch into the first one since you're just fixing
something that isn't in tree yet :)
Regards.

Patch

diff --git a/package/strongswan/Config.in b/package/strongswan/Config.in
index 24b30ad..f7404f6 100644
--- a/package/strongswan/Config.in
+++ b/package/strongswan/Config.in
@@ -16,6 +16,12 @@  menuconfig BR2_PACKAGE_STRONGSWAN
 
 if BR2_PACKAGE_STRONGSWAN
 
+if !BR2_INET_IPV6
+
+comment "kernel-netlink and socket-default options require a toolchain with IPV6 support"
+
+endif
+
 config BR2_PACKAGE_STRONGSWAN_OPENSSL
 	bool "Enables OpenSSL based crypto backends"
 	select BR2_PACKAGE_OPENSSL
diff --git a/package/strongswan/strongswan.mk b/package/strongswan/strongswan.mk
index e235a04..548401d 100644
--- a/package/strongswan/strongswan.mk
+++ b/package/strongswan/strongswan.mk
@@ -10,7 +10,9 @@  STRONGSWAN_SITE = http://download.strongswan.org
 STRONGSWAN_LICENSE = GPLv2+
 STRONGSWAN_LICENSE_FILES = COPYING LICENSE
 STRONGSWAN_CONF_OPT +=                                                             \
-      --enable-pkcs11                                                              \
+      --enable-pkcs11=yes                                                          \
+      --enable-kernel-netlink=$(if $(BR2_INET_IPV6),yes,no)                        \
+      --enable-socket-default=$(if $(BR2_INET_IPV6),yes,no)                        \
       --enable-openssl=$(if $(BR2_PACKAGE_STRONGSWAN_OPENSSL),yes,no)              \
       --enable-gcrypt=$(if $(BR2_PACKAGE_STRONGSWAN_GCRYPT),yes,no)                \
       --enable-gmp=$(if $(BR2_PACKAGE_STRONGSWAN_GMP),yes,no)                      \