Fixed building with musl libc (ticket #685).

This commit is contained in:
Maxim Dounin 2014-12-24 19:01:22 +03:00
parent 6579de97aa
commit b966f5bd88
1 changed files with 2 additions and 0 deletions

View File

@ -31,8 +31,10 @@ ngx_libc_crypt(ngx_pool_t *pool, u_char *key, u_char *salt, u_char **encrypted)
struct crypt_data cd;
cd.initialized = 0;
#ifdef __GLIBC__
/* work around the glibc bug */
cd.current_salt[0] = ~salt[0];
#endif
value = crypt_r((char *) key, (char *) salt, &cd);