From b48e3ac8969dd478efa8bfd129af38f080fd6741 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hugo=20Beauz=C3=A9e-Luyssen?= Date: Wed, 7 Dec 2016 15:14:24 +0100 Subject: [PATCH] crt: Add IMP symbols for lock/unlock_file _lock_file & _unlock_file are always declared as __declspec(import), causing linking programs to search for a __imp___lock_file symbol which wasn't available Signed-off-by: Jean-Baptiste Kempf --- mingw-w64-crt/stdio/mingw_lock.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/mingw-w64-crt/stdio/mingw_lock.c b/mingw-w64-crt/stdio/mingw_lock.c index fe317802f..aaa922314 100644 --- a/mingw-w64-crt/stdio/mingw_lock.c +++ b/mingw-w64-crt/stdio/mingw_lock.c @@ -57,6 +57,8 @@ void __cdecl _lock_file( FILE *pf ) EnterCriticalSection( &(((_FILEX *)pf)->lock) ); } +void *__MINGW_IMP_SYMBOL(_lock_file) = _lock_file; + /*** * _unlock_file - Unlock a FILE @@ -96,3 +98,5 @@ void __cdecl _unlock_file( FILE *pf ) */ LeaveCriticalSection( &(((_FILEX *)pf)->lock) ); } + +void *__MINGW_IMP_SYMBOL(_unlock_file) = _unlock_file;