[vlc-devel] [PATCH] compat: add pread

Steve Lhomme robux4 at gmail.com
Thu Jan 7 15:10:10 CET 2016


On Thu, Jan 7, 2016 at 2:50 PM, Rémi Denis-Courmont <remi at remlab.net> wrote:
> 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.

I'm fine with dropping the non _WIN32 part of the patch. It will be
equivalent to what we have now.

>> +#endif
>
>
> --
> Rémi Denis-Courmont
> http://www.remlab.net/
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel


More information about the vlc-devel mailing list