poll (mingw): allow compiling with GCC 8 and DEVELOPER=1

The return type of the `GetProcAddress()` function is `FARPROC` which evaluates to `long long int (*)()`, i.e. it cannot be cast to the correct function signature by GCC 8. To work around that, we first cast to `void *` and go on with our merry lives. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Johannes Schindelin committed Jun 13, 2019 at 04:49 UTC 8d4679fe0995affd40301169fbfe6d679561bc64
1 file changed +1 -1
compat/poll/poll.c
+1 -1
@@ -149,7 +149,7 @@ win32_compute_revents (HANDLE h, int *p_sought)
149 case FILE_TYPE_PIPE:
150 if (!once_only)
151 {
152 - NtQueryInformationFile = (PNtQueryInformationFile)
152 + NtQueryInformationFile = (PNtQueryInformationFile)(void (*)(void))
153 GetProcAddress (GetModuleHandle ("ntdll.dll"),
154 "NtQueryInformationFile");
155 once_only = TRUE;