Upload Module Compilation on 64-Bit Architecture

Brendan Schwartz bschwartz at wistia.com
Thu Oct 30 08:28:00 MSK 2008


Hello,

I was unable to compile the latest version (2.0.7) of the Nginx upload
module on a 64-bit system. I tried with both Nginx 0.6.32 and 0.7.19.
I received a warning about a comparison of a signed and unsigned int and
Nginx will abort compilation if a warning is encountered.

I was able to successfully compile Nginx with the upload module by changing
line 981 in ngx_http_upload_module.c from:

    if(u->output_file.offset + len > ulcf->max_file_size)

to:

    if((unsigned int)(u->output_file.offset + len) > ulcf->max_file_size)

My C is pretty rusty and I'm hardly acquainted with the Nginx and upload
module source.
So my questions is: was this the right thing to do?

Thanks,
Brendan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://nginx.org/pipermail/nginx/attachments/20081030/4d2f40db/attachment.html>


More information about the nginx mailing list