summaryrefslogtreecommitdiffstats
path: root/src/util.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/util.c')
-rw-r--r--src/util.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/util.c b/src/util.c
index b600586..9e791b4 100644
--- a/src/util.c
+++ b/src/util.c
@@ -39,8 +39,9 @@
# include <io.h>
# define F_OK 0
# define mkdir(path, flags) _mkdir(path)
+# if defined(_MSC_VER) && _MSC_VER <= 1400
/** Implement 'CreateSymbolicLink()' for MSVC 8 or earlier */
-BOOLEAN WINAPI
+extern "C" BOOLEAN WINAPI
CreateSymbolicLink(LPCTSTR linkpath, LPCTSTR targetpath, DWORD flags)
{
typedef BOOLEAN (WINAPI* PFUNC)(LPCTSTR, LPCTSTR, DWORD);
@@ -49,6 +50,7 @@ CreateSymbolicLink(LPCTSTR linkpath, LPCTSTR targetpath, DWORD flags)
"CreateSymbolicLinkA");
return pfn ? pfn(linkpath, targetpath, flags) : 0;
}
+# endif
#else
# include <dirent.h>
# include <limits.h>