Skip to contentSkip to conversation

openswan: fix autobuild failures with uClibc-ng

PATCH New Waldemar Brodkorb 3 participants 4 messages Feb 13, 2017 – Feb 14, 2017

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 openswan: fix autobuild failures with uClibc-ng

Add patch to fix following autobuild failures:

Fixes:
http://autobuild.buildroot.net/results/31cf680c48bec8ba4450a6fe2156cb441c4dd660
http://autobuild.buildroot.net/results/95220f231810cb12ba97a6b44af79f84af706c82

---
 .../0001-uClibc-ng-is-compatible-to-glibc.patch    | 39 ++++++++++++++++++++++
 1 file changed, 39 insertions(+)
 create mode 100644 package/openswan/0001-uClibc-ng-is-compatible-to-glibc.patch
package/openswan/0001-uClibc-ng-is-compatible-to-glibc.patch new file +39 -0
new file mode 100644
index 0000000..aa4d0ed
@@ -0,0 +1,39 @@
+From 0f7bf4706d2932aaa50904fc529a853c9f86478f Mon Sep 17 00:00:00 2001
+From: Waldemar Brodkorb <[email protected]>
+Date: Mon, 13 Feb 2017 22:18:11 +0100
+Subject: [PATCH] uClibc-ng is compatible to glibc
+
+Signed-off-by: Waldemar Brodkorb <[email protected]>
+
+Pull-Request: https://github.com/xelerance/Openswan/pull/227
+
+---
+ linux/include/openswan.h | 12 ------------
+ 1 file changed, 12 deletions(-)
+
+diff --git a/linux/include/openswan.h b/linux/include/openswan.h
+index e2c45a130..66b9d42b2 100644
+--- a/linux/include/openswan.h
++++ b/linux/include/openswan.h
+@@ -27,18 +27,6 @@
+ #endif
+ 
+ /*
+- * When using uclibc, malloc(0) returns NULL instead of success. This is
+- * to make it use the inbuilt work-around.
+- * See: http://osdir.com/ml/network.freeswan.devel/2003-11/msg00009.html
+- */
+-#ifdef __UCLIBC__
+-# if !defined(__MALLOC_GLIBC_COMPAT__) && !defined(MALLOC_GLIBC_COMPAT)
+-#  warning Please compile uclibc with GLIBC_COMPATIBILITY defined
+-# endif
+-#endif
+-
+-
+-/*
+  * We've just got to have some datatypes defined...  And annoyingly, just
+  * where we get them depends on whether we're in userland or not.
+  */
+-- 
+2.11.1
+
Signature · 1 line
2.1.4
#1 lore raw

PATCH 1/1 openswan: fix autobuild failures with uClibc-ng

Hello,

Quoted 11 lines · Waldemar Brodkorb

Add patch to fix following autobuild failures:

Fixes:
http://autobuild.buildroot.net/results/31cf680c48bec8ba4450a6fe2156cb441c4dd660
http://autobuild.buildroot.net/results/95220f231810cb12ba97a6b44af79f84af706c82

---
 .../0001-uClibc-ng-is-compatible-to-glibc.patch    | 39 ++++++++++++++++++++++
 1 file changed, 39 insertions(+)
 create mode 100644 package/openswan/0001-uClibc-ng-is-compatible-to-glibc.patch

Thanks for the patch. While it is nice to fix this warning, there are plenty of other warnings spit out by the openswan build process. I believe the real thing to fix is the usage of -Werror by openswan. Maybe passing WERROR=' ' on the command line is enough?

Thanks,

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
#2 lore raw

PATCH 1/1 openswan: fix autobuild failures with uClibc-ng

Hi Thomas,
Thomas Petazzoni wrote,

Quoted 15 lines

Hello,

Quoted 11 lines · Waldemar Brodkorb

Add patch to fix following autobuild failures:

Fixes:
http://autobuild.buildroot.net/results/31cf680c48bec8ba4450a6fe2156cb441c4dd660
http://autobuild.buildroot.net/results/95220f231810cb12ba97a6b44af79f84af706c82

---
 .../0001-uClibc-ng-is-compatible-to-glibc.patch    | 39 ++++++++++++++++++++++
 1 file changed, 39 insertions(+)
 create mode 100644 package/openswan/0001-uClibc-ng-is-compatible-to-glibc.patch
Quoted 4 lines

Thanks for the patch. While it is nice to fix this warning, there are plenty of other warnings spit out by the openswan build process. I believe the real thing to fix is the usage of -Werror by openswan. Maybe passing WERROR=' ' on the command line is enough?

But the warning is wrong in case of uClibc-ng, because the symbol is removed for a while and malloc(0) is compatible to glibc behaviour. Furthermore it is the only warning with breaks the compilation with -Werror. So at the moment this should be enough. Maybe -Werror can be disabled in a second patch later, if any trouble occurs.

best regards
Waldemar

#3 lore raw

PATCH 1/1 openswan: fix autobuild failures with uClibc-ng

In reply to Waldemar Brodkorb
Quoted 8 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Waldemar" == Waldemar Brodkorb <[email protected]> writes:

Add patch to fix following autobuild failures:
Fixes:
http://autobuild.buildroot.net/results/31cf680c48bec8ba4450a6fe2156cb441c4dd660
http://autobuild.buildroot.net/results/95220f231810cb12ba97a6b44af79f84af706c82

Committed, thanks. Don't forget to send the patch upstream.

Signature · 1 line
Bye, Peter Korsgaard