Skip to content

Commit b0b2171

Browse files
dschoGit for Windows Build Agent
authored and
Git for Windows Build Agent
committed
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 <[email protected]>
1 parent 63dedec commit b0b2171

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

compat/poll/poll.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ win32_compute_revents (HANDLE h, int *p_sought)
149149
case FILE_TYPE_PIPE:
150150
if (!once_only)
151151
{
152-
NtQueryInformationFile = (PNtQueryInformationFile)
152+
NtQueryInformationFile = (PNtQueryInformationFile)(void (*)(void))
153153
GetProcAddress (GetModuleHandleW (L"ntdll.dll"),
154154
"NtQueryInformationFile");
155155
once_only = TRUE;

0 commit comments

Comments
 (0)