aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--win32/mingw.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/win32/mingw.c b/win32/mingw.c
index 04908ba56..79bcaa47d 100644
--- a/win32/mingw.c
+++ b/win32/mingw.c
@@ -1261,6 +1261,7 @@ int link(const char *oldpath, const char *newpath)
1261 LPSECURITY_ATTRIBUTES); 1261 LPSECURITY_ATTRIBUTES);
1262 1262
1263 if (!INIT_PROC_ADDR(kernel32.dll, CreateHardLinkA)) { 1263 if (!INIT_PROC_ADDR(kernel32.dll, CreateHardLinkA)) {
1264 errno = ENOSYS;
1264 return -1; 1265 return -1;
1265 } 1266 }
1266 if (!CreateHardLinkA(newpath, oldpath, NULL)) { 1267 if (!CreateHardLinkA(newpath, oldpath, NULL)) {
@@ -1284,6 +1285,7 @@ int symlink(const char *target, const char *linkpath)
1284 char *targ, *relative = NULL; 1285 char *targ, *relative = NULL;
1285 1286
1286 if (!INIT_PROC_ADDR(kernel32.dll, CreateSymbolicLinkA)) { 1287 if (!INIT_PROC_ADDR(kernel32.dll, CreateSymbolicLinkA)) {
1288 errno = ENOSYS;
1287 return -1; 1289 return -1;
1288 } 1290 }
1289 1291
@@ -1491,6 +1493,7 @@ static char *resolve_symlinks(char *path)
1491 FILE_FLAG_BACKUP_SEMANTICS, NULL); 1493 FILE_FLAG_BACKUP_SEMANTICS, NULL);
1492 if (h != INVALID_HANDLE_VALUE) { 1494 if (h != INVALID_HANDLE_VALUE) {
1493 if (!INIT_PROC_ADDR(kernel32.dll, GetFinalPathNameByHandleA)) { 1495 if (!INIT_PROC_ADDR(kernel32.dll, GetFinalPathNameByHandleA)) {
1496 errno = ENOSYS;
1494 goto end; 1497 goto end;
1495 } 1498 }
1496 1499
@@ -2279,9 +2282,6 @@ void *get_proc_addr(const char *dll, const char *function,
2279 proc->pfunction = GetProcAddress(hnd, function); 2282 proc->pfunction = GetProcAddress(hnd, function);
2280 proc->initialized = 1; 2283 proc->initialized = 1;
2281 } 2284 }
2282 /* set ENOSYS if DLL or function was not found */
2283 if (!proc->pfunction)
2284 errno = ENOSYS;
2285 return proc->pfunction; 2285 return proc->pfunction;
2286} 2286}
2287 2287