int smbc_lseekdir(int fd, off_t offset) { SMBCFILE * file = find_fd(fd); return smbc_getFunctionLseekdir(statcont)(statcont, file, offset); }
static VALUE rb_smbdir_seek(VALUE self, VALUE offset_num) { RB_SMBFILE_DATA_FROM_OBJ(self, data); RB_SMBFILE_DATA_CLOSED(data); smbc_lseekdir_fn fn; off_t offset = (off_t)NUM2LONG(offset_num); fn = smbc_getFunctionLseekdir(data->smbcctx); errno = 0; if ((*fn)(data->smbcctx, data->smbcfile, offset) == -1) { rb_sys_fail(data->url); } return self; }