Nginx Compiler installation Nginx-sticky-module error

Source: Internet
Author: User

The error is as follows:

/usr/local/nginx-sticky-module-1.1/nginx-sticky-module-1.1/ngx_http_sticky_misc.c:in function ' Ngx_http_sticky_ Misc_text_raw ':

/usr/local/nginx-sticky-module-1.1/nginx-sticky-module-1.1/ngx_http_sticky_misc.c:281:2: error:passing argument 2 of ' ngx_sock_ntop ' makes integer from pointer without a cast [-werror]

Src/core/ngx_inet.h:110:8: note:expected ' socklen_t ' but argument is of type ' U_char * '

/usr/local/nginx-sticky-module-1.1/nginx-sticky-module-1.1/ngx_http_sticky_misc.c:281:2: error:passing argument 3 of ' ngx_sock_ntop ' makes pointer from integer without a cast [-werror]

Src/core/ngx_inet.h:110:8: note:expected ' U_char * ' but argument is of type ' size_t '

/usr/local/nginx-sticky-module-1.1/nginx-sticky-module-1.1/ngx_http_sticky_misc.c:281:2: Error:too Few arguments To function ' Ngx_sock_ntop '

Src/core/ngx_inet.h:110:8: note:declared Here

Cc1:all warnings being treated as errors

MAKE[1]: * * * [OBJS/ADDON/NGINX-STICKY-MODULE-1.1/NGX_HTTP_STICKY_MISC.O] Error 1

MAKE[1]: Leaving directory '/root/wuxiaoyu/nginx/nginx-1.8.1 '

Make: * * * [build] Error 2

[Email protected]:~/wuxiaoyu/nginx/nginx-1.8.1#

Workaround

Enter the folder after nginx-sticky-module-1.1 decompression

Vim NGX_HTTP_STICKY_MISC.C +281

Originally:

Digest->len = Ngx_sock_ntop (in, Digest->data, Len, 1);

Change to:

Digest->len =ngx_sock_ntop (in,sizeof (struct sockaddr_in), Digest->data, Len, 1);




Nginx Compiler installation Nginx-sticky-module error

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.