Skip to content

Commit bb83d23

Browse files
committed
Merge #16926: depends: Add OpenSSL termios fix for musl libc
568aa0c Add OpenSSL termios fix for musl libc (Nathan Marley) Pull request description: Currently the version of OpenSSL included in the depends system won't build on musl based systems because `termio.h` does not exist. The proper header named `termios.h` does exist. This PR adds a patch for OpenSSL to replace the `termio.h` header with `termios.h`, which is the proper POSIX header as I understand it. This is a known issue as `TERMIOS` (not `TERMIO`) should be the default, and is fixed in later versions of OpenSSL. There is discussion on the OpenSSL repo here: openssl/openssl#163 This has been [fixed in OpenSSL](openssl/openssl@64e6bf6). This partly fixes #16925 and allows building Bitcoin on Alpine using the depends system. ACKs for top commit: laanwj: ACK 568aa0c Tree-SHA512: d0aac116b7a1133bdecb34a9fb6c63db0336a3547585c07ed31ac9c5edb97e9570dcbf931e7fbc7172ce0735b6bfc11fb204e015532fcd90496a233e8fc17081
2 parents d6026ec + 568aa0c commit bb83d23

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed

depends/packages/openssl.mk

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ $(package)_version=1.0.1k
33
$(package)_download_path=https://www.openssl.org/source
44
$(package)_file_name=$(package)-$($(package)_version).tar.gz
55
$(package)_sha256_hash=8f9faeaebad088e772f4ef5e38252d472be4d878c6b3a2718c10a4fcebe7a41c
6+
$(package)_patches=0001-Add-OpenSSL-termios-fix-for-musl-libc.patch
67

78
define $(package)_set_vars
89
$(package)_config_env=AR="$($(package)_ar)" RANLIB="$($(package)_ranlib)" CC="$($(package)_cc)"
@@ -60,6 +61,7 @@ $(package)_config_opts_i686_mingw32=mingw
6061
endef
6162

6263
define $(package)_preprocess_cmds
64+
patch -p1 < $($(package)_patch_dir)/0001-Add-OpenSSL-termios-fix-for-musl-libc.patch && \
6365
sed -i.old "/define DATE/d" util/mkbuildinf.pl && \
6466
sed -i.old "s|engines apps test|engines|" Makefile.org
6567
endef
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
diff --git a/crypto/ui/ui_openssl.c b/crypto/ui/ui_openssl.c
2+
index a38c758..d99edc2 100644
3+
--- a/crypto/ui/ui_openssl.c
4+
+++ b/crypto/ui/ui_openssl.c
5+
@@ -190,9 +190,9 @@
6+
# undef SGTTY
7+
#endif
8+
9+
-#if defined(linux) && !defined(TERMIO)
10+
-# undef TERMIOS
11+
-# define TERMIO
12+
+#if defined(linux)
13+
+# define TERMIOS
14+
+# undef TERMIO
15+
# undef SGTTY
16+
#endif
17+

0 commit comments

Comments
 (0)