summaryrefslogtreecommitdiff
path: root/net-dialup/ppp/files/ppp-2.4.9-fix-clang-nested-functions.patch
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2022-06-29 12:04:12 +0100
committerV3n3RiX <venerix@koprulu.sector>2022-06-29 12:04:12 +0100
commit0f558761aa2dee1017b4751e4017205e015a9560 (patch)
tree037df795519468a25d9362b4e95cdaeb84eb1cf9 /net-dialup/ppp/files/ppp-2.4.9-fix-clang-nested-functions.patch
parent752d6256e5204b958b0ef7905675a940b5e9172f (diff)
gentoo resync : 29.12.2022
Diffstat (limited to 'net-dialup/ppp/files/ppp-2.4.9-fix-clang-nested-functions.patch')
-rw-r--r--net-dialup/ppp/files/ppp-2.4.9-fix-clang-nested-functions.patch65
1 files changed, 65 insertions, 0 deletions
diff --git a/net-dialup/ppp/files/ppp-2.4.9-fix-clang-nested-functions.patch b/net-dialup/ppp/files/ppp-2.4.9-fix-clang-nested-functions.patch
new file mode 100644
index 000000000000..0a089e95430d
--- /dev/null
+++ b/net-dialup/ppp/files/ppp-2.4.9-fix-clang-nested-functions.patch
@@ -0,0 +1,65 @@
+https://github.com/ppp-project/ppp/commit/6e6a48fe628b76ec368277fd52685428e3dc8766
+https://bugs.gentoo.org/831305
+
+From: =?UTF-8?q?Eivind=20N=C3=A6ss?= <eivnaes@yahoo.com>
+Date: Sun, 11 Jul 2021 14:36:44 -0700
+Subject: [PATCH] Compiling with clang encounters an error in eap-tls.c
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+This moves the inline functions to outside the function and declares them static.
+
+Signed-off-by: Eivind Næss <eivnaes@yahoo.com>
+--- a/pppd/eap-tls.c
++++ b/pppd/eap-tls.c
+@@ -285,6 +285,23 @@ ENGINE *eaptls_ssl_load_engine( char *engine_name )
+ #endif
+
+
++#ifndef OPENSSL_NO_ENGINE
++static int eaptls_UI_writer(UI *ui, UI_STRING *uis)
++{
++ PW_CB_DATA* cb_data = (PW_CB_DATA*)UI_get0_user_data(ui);
++ UI_set_result(ui, uis, cb_data->password);
++ return 1;
++}
++
++static int eaptls_UI_stub(UI* ui) {
++ return 1;
++}
++
++static int eaptls_UI_reader(UI *ui, UI_STRING *uis) {
++ return 1;
++}
++#endif
++
+ /*
+ * Initialize the SSL stacks and tests if certificates, key and crl
+ * for client or server use can be loaded.
+@@ -578,20 +595,11 @@ SSL_CTX *eaptls_init_ssl(int init_server, char *cacertfile, char *capath,
+ {
+ UI_METHOD* transfer_pin = UI_create_method("transfer_pin");
+
+- int writer (UI *ui, UI_STRING *uis)
+- {
+- PW_CB_DATA* cb_data = (PW_CB_DATA*)UI_get0_user_data(ui);
+- UI_set_result(ui, uis, cb_data->password);
+- return 1;
+- };
+- int stub (UI* ui) {return 1;};
+- int stub_reader (UI *ui, UI_STRING *uis) {return 1;};
+-
+- UI_method_set_writer(transfer_pin, writer);
+- UI_method_set_opener(transfer_pin, stub);
+- UI_method_set_closer(transfer_pin, stub);
+- UI_method_set_flusher(transfer_pin, stub);
+- UI_method_set_reader(transfer_pin, stub_reader);
++ UI_method_set_writer(transfer_pin, eaptls_UI_writer);
++ UI_method_set_opener(transfer_pin, eaptls_UI_stub);
++ UI_method_set_closer(transfer_pin, eaptls_UI_stub);
++ UI_method_set_flusher(transfer_pin, eaptls_UI_stub);
++ UI_method_set_reader(transfer_pin, eaptls_UI_reader);
+
+ dbglog( "Using our private key URI: '%s' in engine", privkeyfile );
+ pkey = ENGINE_load_private_key(pkey_engine, privkeyfile, transfer_pin, &cb_data);