[FFmpeg-devel] Win7 64b/mingw32 compilation fix

Pierre Chatelier pierre at chachatelier.fr
Fri Mar 2 12:39:56 EET 2018


Hello,

I had an issue to compile ffmpeg under Win7 64 bits/mingw32
Adding an include was the solution.

Here is a patch

Pierre Chatelier
-------------- next part --------------
From 91f049a9424f80961a8bc3406dc60bccd1d516b9 Mon Sep 17 00:00:00 2001
From: Pierre Chatelier <pierre at chachatelier.fr>
Date: Fri, 2 Mar 2018 11:28:48 +0100
Subject: [PATCH 1/1] fix compilation under Win7 64bits with mingw32 by added
 <WinError.h> the EAI_MEMORY macro was mapped to ERROR_NOT_ENOUGH_MEMORY which
 was not defined

---
 libavformat/os_support.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/libavformat/os_support.c b/libavformat/os_support.c
index 86d0b8f306..f9bd5d9970 100644
--- a/libavformat/os_support.c
+++ b/libavformat/os_support.c
@@ -36,6 +36,7 @@
 #endif /* HAVE_SYS_TIME_H */
 #if HAVE_WINSOCK2_H
 #include <winsock2.h>
+#include <WinError.h>
 #elif HAVE_SYS_SELECT_H
 #include <sys/select.h>
 #endif /* HAVE_WINSOCK2_H */
-- 
2.16.2



More information about the ffmpeg-devel mailing list