error building nginx 1.5.3 on Cygwin

Kevin Worthington kworthington at gmail.com
Sat Aug 3 16:31:54 UTC 2013


Hi Maxim,

Thanks so much. Your patch worked great.

The build was failing without that change.

Is there any way that patch can be incorporated into the main source, so
that it doesn't happen again in 1.5.4?

Thanks again, I really appreciate it.

Best regards,
Kevin
--
Kevin Worthington
http://kevinworthington.com/
http://twitter.com/kworthington


On Sat, Aug 3, 2013 at 6:47 AM, Maxim Dounin <mdounin at mdounin.ru> wrote:

> Hello!
>
> On Fri, Aug 02, 2013 at 09:17:03PM -0400, Kevin Worthington wrote:
>
> > I'm trying to build nginx 1.5.3 on Cygwin using Windows 7. I see the
> > following output during "make":
>
> [...]
>
> > cc1: warnings being treated as errors
> > src/core/ngx_inet.c: In function `ngx_sock_ntop':
> > src/core/ngx_inet.c:236: error: comparison between signed and unsigned
> > make[1]: *** [objs/src/core/ngx_inet.o] Error 1
> > make[1]: Leaving directory `/home/kworthington/nginx-1.5.3'
> > make: *** [build] Error 2
> >
> > I would appreciate any help to fix this. Thank you!
>
> Looks like socklen_t is signed in your environment, which results
> in a warning.  Try the following patch:
>
> --- a/src/core/ngx_inet.c
> +++ b/src/core/ngx_inet.c
> @@ -233,7 +233,7 @@ ngx_sock_ntop(struct sockaddr *sa,
>
>          /* on Linux sockaddr might not include sun_path at all */
>
> -        if (socklen <= offsetof(struct sockaddr_un, sun_path)) {
> +        if (socklen <= (socklen_t) offsetof(struct sockaddr_un,
> sun_path)) {
>              p = ngx_snprintf(text, len, "unix:%Z");
>
>          } else {
>
> Alternatively, you may just ignore the warning, it's harmless.
>
> --
> Maxim Dounin
> http://nginx.org/en/donation.html
>
> _______________________________________________
> nginx mailing list
> nginx at nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx/attachments/20130803/65575eb2/attachment.html>


More information about the nginx mailing list