FreeBSD Bugzilla – Attachment 198116 Details for
Bug 232234
deskutils/pinot: Fix OpenSSL build
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Fix OpenSSL 1.1.x build
pinot (text/plain), 4.38 KB, created by
Nathan
on 2018-10-14 06:40:54 UTC
(
hide
)
Description:
Fix OpenSSL 1.1.x build
Filename:
MIME Type:
Creator:
Nathan
Created:
2018-10-14 06:40:54 UTC
Size:
4.38 KB
patch
obsolete
>deskutils/pinot: Fix OpenSSL build > >PR: 231931 >Submitted by: Nathan <ndowens@yahoo.com> > >Index: deskutils/pinot/Makefile >=================================================================== >--- deskutils/pinot/Makefile (revision 481687) >+++ deskutils/pinot/Makefile (working copy) >@@ -3,7 +3,7 @@ > > PORTNAME= pinot > PORTVERSION= 1.09 >-PORTREVISION= 12 >+PORTREVISION= 13 > CATEGORIES= deskutils > > MAINTAINER= thierry@FreeBSD.org >Index: deskutils/pinot/files/patch-openssl >=================================================================== >--- deskutils/pinot/files/patch-openssl (nonexistent) >+++ deskutils/pinot/files/patch-openssl (working copy) >@@ -0,0 +1,102 @@ >+Description: Catch up with current glib and OpenSSL >+Author: FabriceColin <fabrice.colin@gmail.com> >+Bug-Debian: https://bugs.debian.org/828503 >+Forwarded: yes >+Last-Update: 2018-06-14 >+ >+diff --git Collect/DownloaderInterface.cpp Collect/DownloaderInterface.cpp >+index 10f4f66..f084f50 100644 >+--- Collect/DownloaderInterface.cpp >++++ Collect/DownloaderInterface.cpp >+@@ -1,5 +1,5 @@ >+ /* >+- * Copyright 2005-2008 Fabrice Colin >++ * Copyright 2005-2017 Fabrice Colin >+ * >+ * This program is free software; you can redistribute it and/or modify >+ * it under the terms of the GNU General Public License as published by >+@@ -33,7 +33,8 @@ using namespace std; >+ >+ #ifdef USE_SSL >+ // OpenSSL multi-thread support, required by Curl >+-static pthread_mutex_t locksTable[CRYPTO_NUM_LOCKS]; >++static unsigned int g_lockArrayCount = 0; >++static pthread_mutex_t *g_pLockArray = NULL; >+ >+ // OpenSSL locking functiom >+ static void lockingCallback(int mode, int n, const char *file, int line) >+@@ -42,7 +43,7 @@ static void lockingCallback(int mode, int n, const char *file, int line) >+ >+ if (mode & CRYPTO_LOCK) >+ { >+- status = pthread_mutex_lock(&(locksTable[n])); >++ status = pthread_mutex_lock(&(g_pLockArray[n])); >+ #ifdef DEBUG >+ if (status != 0) >+ { >+@@ -52,7 +53,7 @@ static void lockingCallback(int mode, int n, const char *file, int line) >+ } >+ else >+ { >+- status = pthread_mutex_unlock(&(locksTable[n])); >++ status = pthread_mutex_unlock(&(g_pLockArray[n])); >+ #ifdef DEBUG >+ if (status != 0) >+ { >+@@ -82,9 +83,15 @@ void DownloaderInterface::initialize(void) >+ pthread_mutexattr_settype(&mutexAttr, PTHREAD_MUTEX_ERRORCHECK); >+ >+ // Initialize the OpenSSL mutexes >+- for (unsigned int lockNum = 0; lockNum < CRYPTO_NUM_LOCKS; ++lockNum) >++#ifdef CRYPTO_num_locks >++ g_lockArrayCount = CRYPTO_num_locks(); >++#else >++ g_lockArrayCount = CRYPTO_NUM_LOCKS; >++#endif >++ g_pLockArray = (pthread_mutex_t *)OPENSSL_malloc(g_lockArrayCount * sizeof(pthread_mutex_t)); >++ for (unsigned int lockNum = 0; lockNum < g_lockArrayCount; ++lockNum) >+ { >+- pthread_mutex_init(&(locksTable[lockNum]), &mutexAttr); >++ pthread_mutex_init(&(g_pLockArray[lockNum]), &mutexAttr); >+ } >+ // Set the callbacks >+ CRYPTO_set_locking_callback(lockingCallback); >+@@ -103,10 +110,13 @@ void DownloaderInterface::shutdown(void) >+ CRYPTO_set_locking_callback(NULL); >+ >+ // Free the mutexes >+- for (unsigned int lockNum = 0; lockNum < CRYPTO_NUM_LOCKS; ++lockNum) >++ for (unsigned int lockNum = 0; lockNum < g_lockArrayCount; ++lockNum) >+ { >+- pthread_mutex_destroy(&(locksTable[lockNum])); >++ pthread_mutex_destroy(&(g_pLockArray[lockNum])); >+ } >++ OPENSSL_free(g_pLockArray); >++ g_pLockArray = NULL; >++ g_lockArrayCount = 0; >+ #endif >+ } >+ >+diff --git Utils/MIMEScanner.cpp Utils/MIMEScanner.cpp >+index e02215c..50ceb3d 100644 >+--- Utils/MIMEScanner.cpp >++++ Utils/MIMEScanner.cpp >+@@ -1,5 +1,5 @@ >+ /* >+- * Copyright 2005-2012 Fabrice Colin >++ * Copyright 2005-2017 Fabrice Colin >+ * >+ * This program is free software; you can redistribute it and/or modify >+ * it under the terms of the GNU General Public License as published by >+@@ -456,9 +456,10 @@ MIMEScanner::~MIMEScanner() >+ bool MIMEScanner::initialize(const string &userPrefix, const string &systemPrefix) >+ { >+ #ifdef USE_GIO >++#if !GLIB_CHECK_VERSION(2,35,0) >+ // Initialize the GType system >+ g_type_init(); >+- >++#endif >+ return true; >+ #else >+ list<string> desktopFilesPaths; > >Property changes on: deskutils/pinot/files/patch-openssl >___________________________________________________________________ >Added: fbsd:nokeywords >## -0,0 +1 ## >+yes >\ No newline at end of property >Added: svn:eol-style >## -0,0 +1 ## >+native >\ No newline at end of property >Added: svn:mime-type >## -0,0 +1 ## >+text/plain >\ No newline at end of property
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
ndowens04
:
maintainer-approval?
(
thierry
)
Actions:
View
|
Diff
Attachments on
bug 232234
: 198116