﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc	uname	nginx_version
1865	error: cast between incompatible function types from 'FARPROC' on MinGW	kenhys@…		"Problem: 

https://groonga.org bundles nginx to provide http server, it builds bundled nginx 1.17.3 with MinGW.

https://github.com/groonga/groonga/commit/091fba777241c793b3b3eff582fb64fdb9a74a57/checks

During executing recent CI, it reports error.

Actual:

{{{
2019-10-07T01:05:15.7349316Z cc -c -pipe  -O -W -Wall -Wpointer-arith -Wno-unused-parameter -Werror -g -I/d/a/groonga/groonga/include -I/d/a/groonga/groonga/include   -DNGX_HTTP_GROONGA_LOG_PATH=\""""/mingw64/var/log/groonga/httpd/groonga.log""\"" -DNGX_HTTP_GROONGA_QUERY_LOG_PATH=\""""/mingw64/var/log/groonga/httpd/groonga-query.log""\"" -I src/core -I src/event -I src/event/modules -I src/os/win32 -I objs \
2019-10-07T01:05:15.7361486Z    -o objs/src/os/win32/ngx_win32_init.o \
2019-10-07T01:05:15.7376066Z    src/os/win32/ngx_win32_init.c
error: cast between incompatible function types from 'FARPROC'

}}}

This error is similar to #1546, but occurred place is different.

{{{
2019-10-07T01:05:16.3986206Z src/os/win32/ngx_win32_init.c: In function 'ngx_os_init':
2019-10-07T01:05:16.4540987Z src/os/win32/ngx_win32_init.c:243:15: error: cast between incompatible function types from 'FARPROC' {aka 'long long int (*)()'} to 'int (*)(struct pollfd *, ULONG,  INT)' {aka 'int (*)(struct pollfd *, long unsigned int,  int)'} [-Werror=cast-function-type]
2019-10-07T01:05:16.4695725Z      WSAPoll = (ngx_wsapoll_pt) GetProcAddress(hmod, ""WSAPoll"");
2019-10-07T01:05:16.4715602Z                ^
2019-10-07T01:05:16.4717443Z cc1.exe: all warnings being treated as errors
}}}

Expected:

build succeeds without error.

Addtional Information:

{{{
2019-10-07T00:48:02.4678733Z  + MINGW64_NT-10.0 2.11.1(0.329/5/3) x86_64
2019-10-07T00:48:02.5551913Z  + using GNU C compiler
2019-10-07T00:48:02.6050959Z  + gcc version: 8.2.0 (Rev1, Built by MSYS2 project) 
2019-10-07T00:48:02.7918999Z checking for gcc -pipe switch ... found
2019-10-07T00:48:02.8123895Z checking for MINGW64_NT-10.0 specific features
2019-10-07T00:48:03.1517890Z configuring additional modules
}}}


"	defect	closed	minor		other	1.17.x	fixed			MINGW64_NT-10.0 2.11.1(0.329/5/3) x86_64	1.17.3
