Fixed building with musl libc (ticket #685).
This commit is contained in:
parent
6579de97aa
commit
b966f5bd88
1 changed files with 2 additions and 0 deletions
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in a new issue