summaryrefslogtreecommitdiff
path: root/src/stat/fstat.c
blob: 07f9a5de15e8a54b4f7b1c37ddcb0119190fef5b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
#define _BSD_SOURCE
#include <sys/stat.h>
#include <errno.h>
#include <fcntl.h>
#include "syscall.h"

int fstat(int fd, struct stat *st)
{
	if (fd<0) return __syscall_ret(-EBADF);
	return fstatat(fd, "", st, AT_EMPTY_PATH);
}

weak_alias(fstat, fstat64);