From 71b8d01f4f8cbb3b64363ea7ae5b9580fb7028c4 Mon Sep 17 00:00:00 2001 From: Austin Wise Date: Sun, 12 Dec 2021 22:24:32 -0800 Subject: [PATCH] Fix compile error on MinGW. I'm not sure this is actually the correct thing to do. Why is there an extra const? --- src/rufus.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/rufus.c b/src/rufus.c index fb1fc5e3..a9d76c2b 100755 --- a/src/rufus.c +++ b/src/rufus.c @@ -3208,7 +3208,12 @@ FARPROC WINAPI dllDelayLoadHook(unsigned dliNotify, PDelayLoadInfo pdli) return NULL; } -const PfnDliHook __pfnDliNotifyHook2 = dllDelayLoadHook; + +#ifdef _MSC_VER +// For some reason the Windows SDK headers have a `const` while MinGW does not. +const +#endif +PfnDliHook __pfnDliNotifyHook2 = dllDelayLoadHook; /* * Application Entrypoint