mirror of
https://github.com/sheumann/hush.git
synced 2024-12-30 20:29:21 +00:00
make fdisk compile on libc without llseek64
This commit is contained in:
parent
32a471e4db
commit
06b3cc2811
@ -638,8 +638,16 @@ static void
|
|||||||
seek_sector(ullong secno)
|
seek_sector(ullong secno)
|
||||||
{
|
{
|
||||||
secno *= sector_size;
|
secno *= sector_size;
|
||||||
|
#if ENABLE_FDISK_SUPPORT_LARGE_DISKS
|
||||||
if (lseek64(fd, (off64_t)secno, SEEK_SET) == (off64_t) -1)
|
if (lseek64(fd, (off64_t)secno, SEEK_SET) == (off64_t) -1)
|
||||||
fdisk_fatal(unable_to_seek);
|
fdisk_fatal(unable_to_seek);
|
||||||
|
#else
|
||||||
|
if (secno > MAXINT(off_t)
|
||||||
|
|| lseek(fd, (off_t)secno, SEEK_SET) == (off_t) -1
|
||||||
|
) {
|
||||||
|
fdisk_fatal(unable_to_seek);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
#if ENABLE_FEATURE_FDISK_WRITABLE
|
#if ENABLE_FEATURE_FDISK_WRITABLE
|
||||||
|
Loading…
Reference in New Issue
Block a user