Skip to content

Commit f27e17d

Browse files
committed
- #51424, silent warnings on win
1 parent 675a053 commit f27e17d

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

ext/standard/php_crypt_r.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,15 +75,19 @@ void php_shutdown_crypt_r()
7575

7676
void _crypt_extended_init_r(void)
7777
{
78+
#ifdef PHP_WIN32
79+
LONG volatile initialized = 0;
80+
#else
7881
static volatile sig_atomic_t initialized = 0;
82+
#endif
7983

8084
#ifdef ZTS
8185
tsrm_mutex_lock(php_crypt_extended_init_lock);
8286
#endif
8387

8488
if (!initialized) {
8589
#ifdef PHP_WIN32
86-
InterlockedIncrement(initialized);
90+
InterlockedIncrement(&initialized);
8791
#elif (defined(__GNUC__) && (__GNUC__ >= 4 && __GNUC_MINOR >= 2))
8892
__sync_fetch_and_add(&initialized, 1);
8993
#endif

0 commit comments

Comments
 (0)