libcrypt is no longer part of glibc, so it might not be available.
Signed-off-by: Piotr Sikora <piotr@aviatrix.com>
ngx_feature="crypt()"
-ngx_feature_name=
+ngx_feature_name="NGX_HAVE_CRYPT"
ngx_feature_run=no
ngx_feature_incs=
ngx_feature_path=
if [ $ngx_found = no ]; then
ngx_feature="crypt() in libcrypt"
- ngx_feature_name=
+ ngx_feature_name="NGX_HAVE_CRYPT"
ngx_feature_run=no
ngx_feature_incs=
ngx_feature_path=
#include <malloc.h> /* memalign() */
#include <limits.h> /* IOV_MAX */
#include <sys/ioctl.h>
-#include <crypt.h>
#include <sys/utsname.h> /* uname() */
#include <dlfcn.h>
#include <ngx_auto_config.h>
+#if (NGX_HAVE_CRYPT_H)
+#include <crypt.h>
+#endif
+
+
#if (NGX_HAVE_POSIX_SEM)
#include <semaphore.h>
#endif
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)
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 */