Re: ‘ngx_libc_crypt’ error: implicit declaration of function ‘crypt’

Francis Daly francis at
Sun Feb 9 09:46:35 UTC 2020

On Sat, Feb 08, 2020 at 06:21:34PM +0100, Vincent Blondel wrote:

Hi there,

> anybody know why make nginx 1.17.8 on cygwin fails with ...

> src/os/unix/ngx_user.c: In function ‘ngx_libc_crypt’:
> src/os/unix/ngx_user.c:53:13: error: implicit declaration of function
> ‘crypt’; did you mean ‘creat’? [-Werror=implicit-function-declaration]

On a Linux system here, "man crypt" includes

       #define _XOPEN_SOURCE
       #include <unistd.h>

       char *crypt(const char *key, const char *salt);

And "implicit declaration of function" means that that explicit declaration
did not happen.

So - for some reason, at this stage in your build system, that "#include"
is not present; or the suitable "#define" is not in place; or maybe it
is reading a different unistd.h that does not include "crypt" at all.

That's not an answer; but maybe points you where to look more.

Perhaps your cygwin is different from this; perhaps your "configure"
log or output contains something interesting about unistd.h or crypt.h?

Mine shows, for example,

checking for crypt() ... not found
checking for crypt() in libcrypt ... found

There is more information (probably) in objs/autoconf.err

Good luck with it,

Francis Daly        francis at

More information about the nginx mailing list