From 28a78b7c8b06664a5ec8947987589c245c2c79d8 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Thu, 12 Jul 2018 00:40:36 +0200 Subject: Fix building as C for Windows --- src/util.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/util.c b/src/util.c index cc57225..e057809 100644 --- a/src/util.c +++ b/src/util.c @@ -41,7 +41,10 @@ # define mkdir(path, flags) _mkdir(path) # if (defined(_MSC_VER) && _MSC_VER <= 1400) || defined(__MINGW64__) || defined(__MINGW32__) /** Implement 'CreateSymbolicLink()' for MSVC 8 or earlier */ -extern "C" BOOLEAN WINAPI +#ifdef __cplusplus +extern "C" +#endif +BOOLEAN WINAPI CreateSymbolicLink(LPCTSTR linkpath, LPCTSTR targetpath, DWORD flags) { typedef BOOLEAN (WINAPI* PFUNC)(LPCTSTR, LPCTSTR, DWORD); -- cgit v1.2.1