All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [git commit] package/openswan: allow uClibc build
@ 2022-08-03 17:17 Thomas Petazzoni via buildroot
  0 siblings, 0 replies; only message in thread
From: Thomas Petazzoni via buildroot @ 2022-08-03 17:17 UTC (permalink / raw)
  To: buildroot

commit: https://git.buildroot.net/buildroot/commit/?id=fa4dba4aa202de20e3821eace5513aad81c23275
branch: https://git.buildroot.net/buildroot/commit/?id=refs/heads/master

uClibc-ng 1.0.41 added ns_t_tkey, but since external toolchains may
have a version older than 1.0.41, we introduce a compatibility patch
that avoids the use of ns_t_tkey. This compatibility patch can be
dropped in the future when uClibc-ng 1.0.41 is sufficiently deployed.

Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
---
 ...swan-constants.c-workaround-missing-ns_t_.patch | 29 ++++++++++++++++++++++
 package/openswan/Config.in                         |  6 ++---
 2 files changed, 31 insertions(+), 4 deletions(-)

diff --git a/package/openswan/0001-lib-libopenswan-constants.c-workaround-missing-ns_t_.patch b/package/openswan/0001-lib-libopenswan-constants.c-workaround-missing-ns_t_.patch
new file mode 100644
index 0000000000..ea50dd11ad
--- /dev/null
+++ b/package/openswan/0001-lib-libopenswan-constants.c-workaround-missing-ns_t_.patch
@@ -0,0 +1,29 @@
+From 66f8abe037970dda50fbc460edb2a2fa9f391d8a Mon Sep 17 00:00:00 2001
+From: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
+Date: Wed, 3 Aug 2022 19:14:25 +0200
+Subject: [PATCH] lib/libopenswan/constants.c: workaround missing ns_t_tkey
+ definition in uClibc < 1.0.41
+
+Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
+---
+ lib/libopenswan/constants.c | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/lib/libopenswan/constants.c b/lib/libopenswan/constants.c
+index 90c973b5f..04e68da42 100644
+--- a/lib/libopenswan/constants.c
++++ b/lib/libopenswan/constants.c
+@@ -1411,7 +1411,9 @@ static const char *const rr_qtype_name[] = {
+ 	NULL
+     };
+ 
+-enum_names rr_qtype_names = { ns_t_tkey, ns_t_any
++/* ns_t_tkey is 249, but its definition is missing from uClibc <
++ * 1.0.41, so let's hardcode it */
++enum_names rr_qtype_names = { 249 /* ns_t_tkey */, ns_t_any
+ 			      , rr_qtype_name, &rr_type_names };
+ 
+ static const char *const rr_class_name[] = {
+-- 
+2.37.1
+
diff --git a/package/openswan/Config.in b/package/openswan/Config.in
index c71d064daf..724654e984 100644
--- a/package/openswan/Config.in
+++ b/package/openswan/Config.in
@@ -2,7 +2,6 @@ config BR2_PACKAGE_OPENSWAN
 	bool "openswan"
 	depends on BR2_USE_MMU # iproute2
 	depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_4 # iproute2
-	depends on !BR2_TOOLCHAIN_USES_UCLIBC # ns_t_tkey
 	select BR2_PACKAGE_GMP
 	select BR2_PACKAGE_IPROUTE2
 	help
@@ -10,7 +9,6 @@ config BR2_PACKAGE_OPENSWAN
 
 	  http://www.openswan.org
 
-comment "openswan needs a glibc or musl toolchain w/ headers >= 3.4"
+comment "openswan needs a toolchain w/ headers >= 3.4"
 	depends on BR2_USE_MMU
-	depends on !BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_4 || \
-		BR2_TOOLCHAIN_USES_UCLIBC
+	depends on !BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_4
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2022-08-03 17:17 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-03 17:17 [Buildroot] [git commit] package/openswan: allow uClibc build Thomas Petazzoni via buildroot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.