From 858636cc3935d6bd42a53d057ab1674b90442935 Mon Sep 17 00:00:00 2001 From: Kern Sibbald Date: Sat, 12 Jul 2008 09:13:25 +0000 Subject: [PATCH] Add code to interface OpenSSL to new Win32 pthreads code which used a structure for thread_t. git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@7356 91ce42f0-d328-0410-95d8-f526ca767f89 --- bacula/src/lib/openssl.c | 12 ++++++++---- bacula/technotes-2.5 | 3 +++ 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/bacula/src/lib/openssl.c b/bacula/src/lib/openssl.c index af4a46fb58..7276e9d8d6 100644 --- a/bacula/src/lib/openssl.c +++ b/bacula/src/lib/openssl.c @@ -94,13 +94,17 @@ void openssl_post_errors(JCR *jcr, int code, const char *errstring) */ static unsigned long get_openssl_thread_id(void) { - /* Comparison without use of pthread_equal() is mandated by the OpenSSL API */ +#ifdef HAVE_WIN32 + return (unsigned long)getpid(); +#else /* - * Note that this creates problems with the new Win32 pthreads - * emulation code, which defines pthread_t as a structure. For - * this reason, we continue to use a very old implementation. + * Comparison without use of pthread_equal() is mandated by the OpenSSL API */ + * + * Note: this creates problems with the new Win32 pthreads + * emulation code, which defines pthread_t as a structure. */ return ((unsigned long)pthread_self()); +#endif } /* diff --git a/bacula/technotes-2.5 b/bacula/technotes-2.5 index 1436c9ece5..302f6ded48 100644 --- a/bacula/technotes-2.5 +++ b/bacula/technotes-2.5 @@ -30,6 +30,9 @@ vtape driver General: +12Jul08 +kes Add code to interface OpenSSL to new Win32 pthreads code which + used a structure for thread_t. 09Jul08 ebl tweak bat for win32 compilation 08Jul08 -- 2.39.5