fix lseek() wrapper error handling

This commit is contained in:
John Cupitt 2019-10-28 13:02:36 +00:00
parent ed6b26fcb1
commit 40d679f299
2 changed files with 4 additions and 1 deletions

View File

@ -35,6 +35,8 @@
*
* - filename encoding
* - need printf()-style output? eg. for CSV write ... see dbuf.c
* - make vfuncs just call write() and seek() (for tiff), all other processing
* in the invocation ... cf. streami
* - test we can really change all behaviour in the subclass ... add callbacks
* as well to make it simpler for language bindings
*/

View File

@ -1054,7 +1054,8 @@ vips__seek( int fd, gint64 pos, int whence )
}
#else /*!OS_WIN32*/
if( (new_pos = lseek( fd, pos, whence )) == (off_t) -1 ) {
vips_error_system( "vips__seek", "%s", _( "unable to seek" ) );
vips_error_system( errno, "vips__seek",
"%s", _( "unable to seek" ) );
return( -1 );
}
#endif /*OS_WIN32*/