diff options
author | Piotr Sikora <piotr@aviatrix.com> | 2025-02-12 10:40:58 +0200 |
---|---|---|
committer | Roman Arutyunyan <arutyunyan.roman@gmail.com> | 2025-02-18 16:18:10 +0300 |
commit | 9a4090f02ab438c47178b3b5a4c15a3c769d5027 (patch) | |
tree | 8e2a409fa355f7c3c0100edafd05a33e9aaf84bc /src/os/unix/ngx_user.c | |
parent | f274b3f72fa9aa3b2ed9b32817ed4a88eb2256b3 (diff) | |
download | nginx-9a4090f02ab438c47178b3b5a4c15a3c769d5027.tar.gz nginx-9a4090f02ab438c47178b3b5a4c15a3c769d5027.zip |
Core: fix build without libcrypt.
libcrypt is no longer part of glibc, so it might not be available.
Signed-off-by: Piotr Sikora <piotr@aviatrix.com>
Diffstat (limited to 'src/os/unix/ngx_user.c')
-rw-r--r-- | src/os/unix/ngx_user.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/os/unix/ngx_user.c b/src/os/unix/ngx_user.c index b3d81d07b..8c769ed93 100644 --- a/src/os/unix/ngx_user.c +++ b/src/os/unix/ngx_user.c @@ -41,7 +41,7 @@ ngx_libc_crypt(ngx_pool_t *pool, u_char *key, u_char *salt, u_char **encrypted) return NGX_ERROR; } -#else +#elif (NGX_HAVE_CRYPT) ngx_int_t ngx_libc_crypt(ngx_pool_t *pool, u_char *key, u_char *salt, u_char **encrypted) @@ -71,6 +71,14 @@ ngx_libc_crypt(ngx_pool_t *pool, u_char *key, u_char *salt, u_char **encrypted) return NGX_ERROR; } +#else + +ngx_int_t +ngx_libc_crypt(ngx_pool_t *pool, u_char *key, u_char *salt, u_char **encrypted) +{ + return NGX_ERROR; +} + #endif #endif /* NGX_CRYPT */ |