[vlc-devel] [PATCH] compat: add pread
Rémi Denis-Courmont
remi at remlab.net
Thu Jan 7 14:50:16 CET 2016
Le 2016-01-07 15:26, Steve Lhomme a écrit :
> +#include <io.h>
??
> +
> +ssize_t pread (int fd, void *buf, size_t count, off_t offset)
> +{
> + if ( lseek (fd, offset, SEEK_SET) != offset ) {
> + return -1;
> + }
> + return read( fd, buf, count );
> +}
This is not how I understand pread() to (be supposed to) work.
> +#endif
--
Rémi Denis-Courmont
http://www.remlab.net/
More information about the vlc-devel
mailing list