aboutsummaryrefslogtreecommitdiff
path: root/src/unistd/link.c
blob: b4290edd2dc5dcbebe583bb7cc725f5d603a999b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#include <unistd.h>
#include <fcntl.h>
#include "syscall.h"

int link(const char *existing, const char *new)
{
#ifdef SYS_link
	return syscall(SYS_link, existing, new);
#else
	return syscall(SYS_linkat, AT_FDCWD, existing, AT_FDCWD, new, 0);
#endif
}


#ifdef TEST
int
main(void) {
	return 0;
}
#endif