Welcome! Log In Create A New Profile

Advanced

Re: NGINX 1.0.3 compile error: src/core/ngx_crypt.c: In function ‘ngx_crypt_apr1’

All files from this thread

File Name File Size   Posted by Date  
1.9 KB open | download Dalibor Jotanovic 05/27/2011 Read message
1.1 KB open | download Dalibor Jotanovic 05/27/2011 Read message
1.9 KB open | download Dalibor Jotanovic 05/27/2011 Read message
1.1 KB open | download Dalibor Jotanovic 05/27/2011 Read message
Maxim Dounin
May 27, 2011 08:08AM
Hello!

On Fri, May 27, 2011 at 01:57:45PM +0400, Igor Sysoev wrote:

> On Fri, May 27, 2011 at 11:30:17AM +0200, Dalibor Jotanovic wrote:
> > Hi,
> >
> > i'm having problems compiling the latest stable source 1.0.3.
> >
> > How to reproduce:
> >
> > cd <sourcedirectory>
> > ./configure
> > make
> >
> > make output is attached in log.txt
> >
> > I do not have any problems compiling stable source 1.0.2
> >
> > Is suspect this issue beeing a bug. Can somebody confirm this?
>
> > gcc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Wunused-function -Wunused-variable -Wunused-value -Werror -g -I src/core -I
> > src/event -I src/event/modules -I src/os/unix -I objs \
> > -o objs/src/core/ngx_crypt.o \
> > src/core/ngx_crypt.c
> > cc1: warnings being treated as errors
> > src/core/ngx_crypt.c: In function Б─≤ngx_crypt_apr1Б─≥:
> > src/core/ngx_crypt.c:76: warning: pointer targets in passing argument 2 of Б─≤ngx_md5_updateБ─≥ differ in signedness
>
> Thank you for the report.
> The attached patch should fix the issue.
>
>
> --
> Igor Sysoev

> Index: src/core/ngx_md5.c
> ===================================================================
> --- src/core/ngx_md5.c (revision 3927)
> +++ src/core/ngx_md5.c (working copy)
> @@ -32,7 +32,7 @@
>
>
> void
> -ngx_md5_update(ngx_md5_t *ctx, const u_char *data, size_t size)
> +ngx_md5_update(ngx_md5_t *ctx, const void *data, size_t size)

$ grep MD5Update /usr/include/sys/md5.h
void MD5Update (MD5_CTX *, const unsigned char *, unsigned int);

So this is required anyway:

diff --git a/src/core/ngx_crypt.c b/src/core/ngx_crypt.c
--- a/src/core/ngx_crypt.c
+++ b/src/core/ngx_crypt.c
@@ -74,7 +74,7 @@ ngx_crypt_apr1(ngx_pool_t *pool, u_char

ngx_md5_init(&md5);
ngx_md5_update(&md5, key, keylen);
- ngx_md5_update(&md5, "$apr1$", sizeof("$apr1$") - 1);
+ ngx_md5_update(&md5, (u_char *) "$apr1$", sizeof("$apr1$") - 1);
ngx_md5_update(&md5, salt, saltlen);

ngx_md5_init(&ctx1);

Sorry for the breakage. BTW, it's probably good idea to finally
branch stable-1.0 and start releasing 1.1.*.

Maxim Dounin

_______________________________________________
nginx mailing list
nginx@nginx.org
http://nginx.org/mailman/listinfo/nginx
Subject Author Posted

NGINX 1.0.3 compile error: src/core/ngx_crypt.c: In function ‘ngx_crypt_apr1’ Attachments

Dalibor Jotanovic May 27, 2011 05:32AM

Re: NGINX 1.0.3 compile error: src/core/ngx_crypt.c: In function ‘ngx_crypt_apr1’

Igor Sysoev May 27, 2011 05:58AM

Antw: Re: NGINX 1.0.3 compile error: src/core/ngx_crypt.c: In function ‘ngx_crypt_apr1’ Attachments

Dalibor Jotanovic May 27, 2011 06:40AM

Re: NGINX 1.0.3 compile error: src/core/ngx_crypt.c: In function ‘ngx_crypt_apr1’

Maxim Dounin May 27, 2011 08:08AM

Re: NGINX 1.0.3 compile error: src/core/ngx_crypt.c: In function ‘ngx_crypt_apr1’

Igor Sysoev May 27, 2011 08:20AM

Re: NGINX 1.0.3 compile error: src/core/ngx_crypt.c: In function ‘ngx_crypt_apr1’

Igor Sysoev May 27, 2011 08:36AM

Re: NGINX 1.0.3 compile error: src/core/ngx_crypt.c: In function ‘ngx_crypt_apr1’

Maxim Dounin May 27, 2011 08:38AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 60
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready