]> git.kaiwu.me - nginx.git/commitdiff
Fixed building with musl libc (ticket #685).
authorMaxim Dounin <mdounin@mdounin.ru>
Wed, 24 Dec 2014 16:01:22 +0000 (19:01 +0300)
committerMaxim Dounin <mdounin@mdounin.ru>
Wed, 24 Dec 2014 16:01:22 +0000 (19:01 +0300)
src/os/unix/ngx_user.c

index 7a71203cb8f9eea33264ffb8d408a31e91cc842d..3491f1c9ea12a67eea5092966581b22e104ad018 100644 (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);