Skip to contentSkip to conversation

openssl: Add patch to fix compilation with musl libc

PATCH New Maarten ter Huurne 3 participants 3 messages Sep 11, 2014 – Sep 28, 2014

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 openssl: Add patch to fix compilation with musl libc

---
 package/openssl/openssl-004-musl-termios.patch | 46 ++++++++++++++++++++++++++
 1 file changed, 46 insertions(+)
 create mode 100644 package/openssl/openssl-004-musl-termios.patch
package/openssl/openssl-004-musl-termios.patch new file +46 -0
new file mode 100644
index 0000000..66631d1
@@ -0,0 +1,46 @@
+http://rt.openssl.org/Ticket/Display.html?id=3123
+
+From:	 Kevin Bortis <[email protected]>
+
+The attached patch fixes issues with musl libc on linux. musl does
+implement the POSIX 2008 standard termios.h on linux and does not
+include the non standard interface termio.h.
+
+The problem with dlinfo does no longer exists, since musl has
+implemented the required interface.
+
+This closes #2823 for me.
+
+Tested version:
+musl libc: 0.9.13
+openssl git: 1769dfab06dcf93a1c310ca7ea9531afcc448d0a
+
+Comparison of termios.h implementation on linux:
+
+glibc 2.17: does implement termios.h, passes make test
+musl 0.9.13: does implement termios.h, passes make test
+uClibc 0.9.33.2: does implement termios.h, not tested
+dietlibc 0.33: does implement termios.h, not tested
+
+I don't know the reason why termio.h is prefered on linux, since
+termios.h is generally prefered and implemented by all major libc
+implementations.
+
+Regards
+Kevin
+
+--- a/crypto/ui/ui_openssl.c	2013-09-08 11:00:10.130572803 +0200
++++ b/crypto/ui/ui_openssl.c	2013-09-08 11:29:35.806580447 +0200
+@@ -190,9 +190,9 @@
+ # undef  SGTTY
+ #endif
+ 
+-#if defined(linux) && !defined(TERMIO)
+-# undef  TERMIOS
+-# define TERMIO
++#if defined(linux)
++# define TERMIOS
++# undef  TERMIO
+ # undef  SGTTY
+ #endif
+ 
Signature · 1 line
1.8.4.5
#1 lore raw

PATCH 1/1 openssl: Add patch to fix compilation with musl libc

Maarten ter Huurne <[email protected]> wrote
in news:1410399603-548-1-git-send-email-maarten at treewalker.org:

Quoted 1 line
Signed-off-by Maarten ter Huurne <maarten-

[email protected]>

Quoted 2 lines
---
 package/openssl/openssl-004-musl-termios.patch | 46 

++++++++++++++++++++++++++

Review

Quoted 4 lines
 1 file changed, 46 insertions(+)
 create mode 100644 package/openssl/openssl-004-musl-termios.patch
(quoted diff) +0 -0

b/package/openssl/openssl-004-musl-termios.patch

Quoted 41 lines

new file mode 100644
index 0000000..66631d1

package/openssl/openssl-004-musl-termios.patch new file +36 -0
@@ -0,0 +1,46 @@
+http://rt.openssl.org/Ticket/Display.html?id=3123
+
+From:      Kevin Bortis <[email protected]>
+
+The attached patch fixes issues with musl libc on linux. musl does
+implement the POSIX 2008 standard termios.h on linux and does not
+include the non standard interface termio.h.
+
+The problem with dlinfo does no longer exists, since musl has
+implemented the required interface.
+
+This closes #2823 for me.
+
+Tested version:
+musl libc: 0.9.13
+openssl git: 1769dfab06dcf93a1c310ca7ea9531afcc448d0a
+
+Comparison of termios.h implementation on linux:
+
+glibc 2.17: does implement termios.h, passes make test
+musl 0.9.13: does implement termios.h, passes make test
+uClibc 0.9.33.2: does implement termios.h, not tested
+dietlibc 0.33: does implement termios.h, not tested
+
+I don't know the reason why termio.h is prefered on linux, since
+termios.h is generally prefered and implemented by all major libc
+implementations.
+
+Regards
+Kevin
+
+--- a/crypto/ui/ui_openssl.c     2013-09-08 11:00:10.130572803 +0200
++++ b/crypto/ui/ui_openssl.c     2013-09-08 11:29:35.806580447 +0200
+@@ -190,9 +190,9 @@
+ # undef  SGTTY
+ #endif

package/openssl/openssl-004-musl-termios.patch line 46

Quoted 10 lines
package/openssl/openssl-004-musl-termios.patch new file +10 -0
+ 
+-#if defined(linux) && !defined(TERMIO)
+-# undef  TERMIOS
+-# define TERMIO
++#if defined(linux)
++# define TERMIOS
++# undef  TERMIO
+ # undef  SGTTY
+ #endif
+