Some MinGW fixes (SF#1684879: https://sourceforge.net/tracker/index.php?func=detail&aid=1684879&group_id=13478&atid=113478)
diff --git a/doc/html/changelog.html b/doc/html/changelog.html
index ccf4357..d4a7604 100644
--- a/doc/html/changelog.html
+++ b/doc/html/changelog.html
@@ -100,6 +100,7 @@
 				<ul>
 					<li>Fixed bug compiling <span class="commandname">flac</span> without Ogg support (<a href="https://sourceforge.net/tracker/index.php?func=detail&amp;aid=1760786&amp;group_id=13478&amp;atid=113478">SF #1760786</a>).</li>
 					<li>Fixed bug where sometimes an existing installation of flac could interfere with the build process (<a href="https://sourceforge.net/tracker/index.php?func=detail&amp;aid=1763690&amp;group_id=13478&amp;atid=113478">SF #1763690</a>).</li>
+					<li>Some MinGW fixes (<a href="https://sourceforge.net/tracker/index.php?func=detail&amp;aid=1684879&amp;group_id=13478&amp;atid=113478">SF #1684879</a>).</li>
 				</ul>
 			</li>
 			<li>
diff --git a/src/libFLAC/bitreader.c b/src/libFLAC/bitreader.c
index ce6fe82..7d63e52 100644
--- a/src/libFLAC/bitreader.c
+++ b/src/libFLAC/bitreader.c
@@ -39,6 +39,8 @@
 #include <winsock.h> /* for ntohl() */
 #elif defined FLAC__SYS_DARWIN
 #include <machine/endian.h> /* for ntohl() */
+#elif defined __MINGW32__
+#include <winsock.h> /* for ntohl() */
 #else
 #include <netinet/in.h> /* for ntohl() */
 #endif
diff --git a/src/libFLAC/bitwriter.c b/src/libFLAC/bitwriter.c
index 4e34a38..4a43530 100644
--- a/src/libFLAC/bitwriter.c
+++ b/src/libFLAC/bitwriter.c
@@ -39,6 +39,8 @@
 #include <winsock.h> /* for ntohl() */
 #elif defined FLAC__SYS_DARWIN
 #include <machine/endian.h> /* for ntohl() */
+#elif defined __MINGW32__
+#include <winsock.h> /* for ntohl() */
 #else
 #include <netinet/in.h> /* for ntohl() */
 #endif
diff --git a/src/share/grabbag/file.c b/src/share/grabbag/file.c
index a481f74..d073c4b 100644
--- a/src/share/grabbag/file.c
+++ b/src/share/grabbag/file.c
@@ -42,8 +42,8 @@
 #include <string.h> /* for strrchr() */
 #if defined _WIN32 && !defined __CYGWIN__
 // for GetFileInformationByHandle() etc
-#include <Windows.h>
-#include <Winbase.h>
+#include <windows.h>
+#include <winbase.h>
 #endif
 #include "share/grabbag.h"