link.c 251 字节
Newer Older
R
Rich Felker 已提交
1
#include <unistd.h>
2
#include <fcntl.h>
R
Rich Felker 已提交
3 4 5 6
#include "syscall.h"

int link(const char *existing, const char *new)
{
7
#ifdef SYS_link
8
	return syscall(SYS_link, existing, new);
9 10 11
#else
	return syscall(SYS_linkat, AT_FDCWD, existing, AT_FDCWD, new, 0);
#endif
R
Rich Felker 已提交
12
}