]>
git.proxmox.com Git - wasi-libc.git/blob - libc-bottom-half/sources/__wasilibc_tell.c
4 off_t
__wasilibc_tell(int fildes
) {
5 __wasi_filesize_t offset
;
6 __wasi_errno_t error
= __wasi_fd_tell(fildes
, &offset
);
8 // lseek returns ESPIPE on when called on a pipe, socket, or fifo,
9 // which on WASI would translate into ENOTCAPABLE.
10 errno
= error
== ENOTCAPABLE
? ESPIPE
: error
;