TeslaGov/ngx-http-auth-jwt-module

Unable to compile since PR #56

goldyfruit opened this issue · 1 comments

Since PR #56, I'm not able to compile Nginx with this module.

I got this compilation error:

cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g   -I src/core -I src/event -I src/event/modules -I src/os/unix -I objs -I src/http -I src/http/modules \
	-o objs/addon/src/ngx_http_auth_jwt_module.o \
	../ngx-http-auth-jwt-module/src/ngx_http_auth_jwt_module.c
../ngx-http-auth-jwt-module/src/ngx_http_auth_jwt_module.c: In function ‘loadAuthKey’:
../ngx-http-auth-jwt-module/src/ngx_http_auth_jwt_module.c:438:2: error: ignoring return value of ‘fread’ declared with attribute ‘warn_unused_result’ [-Werror=unused-result]
  438 |  fread(conf->_auth_jwt_keyfile.data, 1, keySize, keyFile);
      |  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
make[1]: *** [objs/Makefile:1250: objs/addon/src/ngx_http_auth_jwt_module.o] Error 1
make: *** [Makefile:10: build] Error 2

I tried different Nginx versions without success, which leads me to try the previous commit of this module which was a success.

@goldyfruit this seems to be resolved. Please comment back if it's still an issue!