diff --git a/ext/opcache/jit/zend_jit_x86.dasc b/ext/opcache/jit/zend_jit_x86.dasc index 6bb65422e3d..6b785d9e2b2 100644 --- a/ext/opcache/jit/zend_jit_x86.dasc +++ b/ext/opcache/jit/zend_jit_x86.dasc @@ -2925,7 +2925,7 @@ static int zend_jit_setup(void) /* To find offset of "_tsrm_ls_cache" in TLS segment we perform a linear scan of local TLS memory */ /* Probably, it might be better solution */ do { - void ***tls_mem = ((void***)__readfsdword(0x2c))[_tls_index]; + void ***tls_mem = ((void**)__readfsdword(0x2c))[_tls_index]; void *val = _tsrm_ls_cache; size_t offset = 0; size_t size = (char*)&_tls_end - (char*)&_tls_start; diff --git a/main/streams/plain_wrapper.c b/main/streams/plain_wrapper.c index f8c3d89aefa..54c48d9ee11 100644 --- a/main/streams/plain_wrapper.c +++ b/main/streams/plain_wrapper.c @@ -879,7 +879,11 @@ static int php_stdiop_set_option(php_stream *stream, int option, int value, void size_t rounded_offset = (range->offset / gran) * gran; delta = range->offset - rounded_offset; loffs = (DWORD)rounded_offset; +#ifdef _WIN64 hoffs = (DWORD)(rounded_offset >> 32); +#else + hoffs = 0; +#endif } /* MapViewOfFile()ing zero bytes would map to the end of the file; match *nix behavior instead */