masterzen / nginx-upload-progress-module

Nginx module implementing an upload progress system, that monitors RFC1867 POST uploads as they are transmitted to upstream servers.

Home Page:http://wiki.codemongers.com/NginxHttpUploadProgressModule

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Build fails with Nginx 1.1.2

perusio opened this issue · comments

Nginx 1.1.2 no longer defines the NGX_PARSE_LARGE_TIME constant. So the build fails. I was able to get it to build by using this hack:

  #ifndef NGX_PARSE_LARGE_TIME
  #define NGX_PARSE_LARGE_TIME -2
  #endif /* NGX_PARSE_LARGE_TIME */

Adding it to the module file at the top. Of course this is not a fix. A proper fix is to see what changed in the API and update the module according to the new API.

Hmm, I just downloaded nginx 1.1.2 and NGX_PARSE_LARGE_TIME is defined in src/core/ngx_parse.h
And the upload progress module builds fine.

Can you double-check?

You're right. The original source still includes the ngx_parse.h header file. Is just that I'm using a patched version using this patch that removes that header file altogether. According to the patch comments:

Time parsing cleanup. Nuke NGX_PARSE_LARGE_TIME, it's not used since 0.6.30. The only error ngx_parse_time() can currently return is NGX_ERROR, check it explicitly and make sure to cast it to appropriate type (either time_t or ngx_msec_t) to avoid signedness warnings on platforms with unsigned time_t (notably QNX).