diff --git a/CHANGES b/CHANGES index e48607bf01..b7f4b73b2a 100644 --- a/CHANGES +++ b/CHANGES @@ -1,5 +1,7 @@ Changes with Apache 2.0.37 + *) Fix a mod_ssl build problem on OS/390. [Jeff Trawick] + *) Fixed If-Modified-Since on Win32, which would give false positives because of the sub-second resolution of file timestamps on that platform. [Cliff Woolley] diff --git a/modules/ssl/ssl_util.c b/modules/ssl/ssl_util.c index b01f18db41..2147473638 100644 --- a/modules/ssl/ssl_util.c +++ b/modules/ssl/ssl_util.c @@ -419,7 +419,20 @@ static void ssl_util_thr_lock(int mode, int type, static unsigned long ssl_util_thr_id(void) { + /* OpenSSL needs this to return an unsigned long. On OS/390, the pthread + * id is a structure twice that big. Use the TCB pointer instead as a + * unique unsigned long. + */ +#ifdef __MVS__ + struct PSA { + char unmapped[540]; + unsigned long PSATOLD; + } *psaptr = 0; + + return psaptr->PSATOLD; +#else return (unsigned long) apr_os_thread_current(); +#endif } static apr_status_t ssl_util_thread_cleanup(void *data)