[vlc-devel] [PATCH] compat:flockfile: fix linking with MinGW64
Steve Lhomme
robux4 at videolabs.io
Fri Feb 26 09:29:29 CET 2016
We detect the presence of _lock_file() by testing linking, but when compiling
we include <stdio.h> that forces an incorrect runtime linkage in recent MinGW.
It is defined as _lock_file in msvcrt but __imp_lock_file in msvcrt120.
---
compat/flockfile.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/compat/flockfile.c b/compat/flockfile.c
index d01fd1f..1c3a746 100644
--- a/compat/flockfile.c
+++ b/compat/flockfile.c
@@ -18,6 +18,7 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
+#define _CRTIMP
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
--
2.6.1.windows.1
More information about the vlc-devel
mailing list