From 79e1d59d274cc22b86f9951a70357a71acd1619e Mon Sep 17 00:00:00 2001 From: Bernd Kuhls Date: Sun, 27 Sep 2026 12:42:23 +0200 Subject: [PATCH] package/gloox: fix build with OpenSSL 4.0.0 Signed-off-by: Bernd Kuhls Signed-off-by: Thomas Petazzoni --- .../0001-Fix-build-with-OpenSSL-4.x.patch | 43 +++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 package/gloox/0001-Fix-build-with-OpenSSL-4.x.patch diff --git a/package/gloox/0001-Fix-build-with-OpenSSL-4.x.patch b/package/gloox/0001-Fix-build-with-OpenSSL-4.x.patch new file mode 100644 index 0000000000..bae3319115 --- /dev/null +++ b/package/gloox/0001-Fix-build-with-OpenSSL-4.x.patch @@ -0,0 +1,43 @@ +From 69c49c945aa3847eb12a995f949d97a2a99642f6 Mon Sep 17 00:00:00 2001 +From: Bernd Kuhls +Date: Wed, 9 Sep 2026 23:27:07 +0200 +Subject: [PATCH] Fix build with OpenSSL 4.x + +Upstream: dead + +Signed-off-by: Bernd Kuhls +--- + src/tlsopensslbase.cpp | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/src/tlsopensslbase.cpp b/src/tlsopensslbase.cpp +index bfa1fd9..a71ff11 100644 +--- a/src/tlsopensslbase.cpp ++++ b/src/tlsopensslbase.cpp +@@ -224,12 +224,12 @@ namespace gloox + int OpenSSLBase::ASN1Time2UnixTime( ASN1_TIME* time ) + { + struct tm t; +- const char* str = reinterpret_cast( time->data ); ++ const char* str = reinterpret_cast( ASN1_STRING_get0_data(time) ); + size_t i = 0; + + memset( &t, 0, sizeof(t) ); + +- if( time->type == V_ASN1_UTCTIME ) /* two digit year */ ++ if( ASN1_STRING_type(time) == V_ASN1_UTCTIME ) /* two digit year */ + { + t.tm_year = ( str[i++] - '0' ) * 10; + t.tm_year += ( str[i++] - '0' ); +@@ -237,7 +237,7 @@ namespace gloox + if( t.tm_year < 70 ) + t.tm_year += 100; + } +- else if( time->type == V_ASN1_GENERALIZEDTIME ) /* four digit year */ ++ else if( ASN1_STRING_type(time) == V_ASN1_GENERALIZEDTIME ) /* four digit year */ + { + t.tm_year = ( str[i++] - '0' ) * 1000; + t.tm_year += ( str[i++] - '0' ) * 100; +-- +2.47.3 +