mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-12-01 11:33:41 +03:00
vere: compat: polyfill link() on windows
This commit is contained in:
parent
45d4c5ef68
commit
baf690c85a
@ -134,6 +134,16 @@ int err_win_to_posix(DWORD winerr)
|
||||
return error;
|
||||
}
|
||||
|
||||
int link(const char *path1, const char *path2)
|
||||
{
|
||||
if ( CreateHardLinkA(path2, path1, NULL) ) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
errno = err_win_to_posix(GetLastError());
|
||||
return -1;
|
||||
}
|
||||
|
||||
// from msys2 mingw-packages-dev patches
|
||||
// -----------------------------------------------------------------------
|
||||
|
||||
|
@ -3,6 +3,7 @@
|
||||
|
||||
#define mkdir(A, B) mkdir(A)
|
||||
|
||||
int link(const char *path1, const char *path2);
|
||||
char *realpath(const char *path, char *resolved_path);
|
||||
int fdatasync(int fd);
|
||||
int utimes(const char *path, const struct timeval times[2]);
|
||||
|
Loading…
Reference in New Issue
Block a user