mirror of
https://github.com/cahirwpz/libnix.git
synced 2025-12-08 14:58:56 +00:00
15 lines
212 B
C
15 lines
212 B
C
#include <errno.h>
|
|
//
|
|
#include "stdio.h"
|
|
|
|
int fstat(int d, struct stat *buf)
|
|
{ StdFileDes *fp = _lx_fhfromfd(d);
|
|
if (fp) {
|
|
return fp->lx_fstat(fp, buf);
|
|
}
|
|
else {
|
|
errno = EBADF;
|
|
return -1;
|
|
}
|
|
}
|