Sadly never found an answer to this. I tried to get this to go through with mingw with no luck. Its got to be something wierd with the current mingw version but all I got from the mingw newsgroup was that is was my fault mingw didn't work. Search back a few months here for mentions of mingw and theres about 2 pages of attempts to get a solution that never came to flortition.
You may want to try mxe though then you'll need to find you way on their issues board where they did say it compiles for them with instruction they gave me in their issues area on github I haven't tried any further since u1's came to be supported
Thanks for the head up.
Edit:
After searching on google, look like i found the problem. http://msdn.microsoft.com/en-us/library/windows/desktop/ms737629%28v=vs.85%29.aspx
There is some wrong include on util.h line 32. Base on the article, winsock.h must be include before ws2tcpip.h.
#elif defined WIN32
#include
#include
Other problem is Windows.h header defaults to including the Winsock.h which will conflict with the declarations in the Winsock2.h.
So this is the adjustment.
#elif defined WIN32
#ifndef WIN32_LEAN_AND_MEAN
#define WIN32_LEAN_AND_MEAN
#endif
#include
#include
#include
#include
#include
But then i got other error
CCLD cgminer.exe
cgminer-cgminer.o: In function `clean_up':
C:\MinGW\msys\1.0\home\Zinc\cgminer/cgminer.c:8794: undefined reference to `time
EndPeriod'
cgminer-cgminer.o: In function `hashmeter':
C:\MinGW\msys\1.0\home\Zinc\cgminer/cgminer.c:6096: undefined reference to `llro
und'
cgminer-cgminer.o: In function `clean_up':
C:\MinGW\msys\1.0\home\Zinc\cgminer/cgminer.c:8794: undefined reference to `time
EndPeriod'
cgminer-cgminer.o: In function `main':
C:\MinGW\msys\1.0\home\Zinc\cgminer/cgminer.c:9657: undefined reference to `time
BeginPeriod'
collect2.exe: error: ld returned 1 exit status
make[2]: *** [cgminer.exe] Error 1
make[2]: Leaving directory `/home/Zinc/cgminer'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/Zinc/cgminer'
make: *** [all] Error 2