comparison src/os/unix/ngx_user.c @ 5955:fd6fd02f6a4d

Fixed building with musl libc (ticket #685).
author Maxim Dounin <mdounin@mdounin.ru>
date Wed, 24 Dec 2014 19:01:22 +0300
parents 6ccd3a50b40f
children 457ec43dd8d5
comparison
equal deleted inserted replaced
5954:53499b86242e 5955:fd6fd02f6a4d
29 char *value; 29 char *value;
30 size_t len; 30 size_t len;
31 struct crypt_data cd; 31 struct crypt_data cd;
32 32
33 cd.initialized = 0; 33 cd.initialized = 0;
34 #ifdef __GLIBC__
34 /* work around the glibc bug */ 35 /* work around the glibc bug */
35 cd.current_salt[0] = ~salt[0]; 36 cd.current_salt[0] = ~salt[0];
37 #endif
36 38
37 value = crypt_r((char *) key, (char *) salt, &cd); 39 value = crypt_r((char *) key, (char *) salt, &cd);
38 40
39 if (value) { 41 if (value) {
40 len = ngx_strlen(value) + 1; 42 len = ngx_strlen(value) + 1;