Skip to content

Conversation

@adbjo
Copy link

@adbjo adbjo commented Jan 13, 2026

Fixes the function for checking if the source is seekable (main_stat_file), so that block devices are correctly identified as seekable.

Currently, xdelta3 throws the following error when checking if block devices are seekable:

non-seekable source in decode: XD3_INTERNAL

Changes:

  • Added inclusion of <sys/ioctl.h> and defined the BLKGETSIZE64 macro for block device size retrieval in xdelta3/xdelta3-main.h.
  • Updated main_file_stat to detect block devices using S_ISBLK, retrieve their size with ioctl and BLKGETSIZE64, and set the file size accordingly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant