aboutsummaryrefslogtreecommitdiff
path: root/tests/chapters/shim/file.h
blob: 7601b39fdb11bf9cd00644d486068ad7db89539b (plain)
1
2
3
4
5
#pragma once
#include <fcntl.h>
#include <unistd.h>
#include <sys/stat.h>
static inline off_t ffilesize(int fd){ struct stat st; return fstat(fd,&st)?-1:st.st_size; }