← Commit list

fdca28aaf

Denys Vlasenko
Denys Vlasenko
2026-04-29
SUCCESS Duration: 143s

Subject

fdisk: fix build failure on glibc

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0
gcc -Wp,-MD,applets/.usage.d -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer      -Iinclude -Iinclude -o applets/usage applets/usage.c

Build Log

(log yok)

Commit Diff GitHub →

util-linux/fdisk.c+3 -1
@@ -543,7 +543,9 @@ static uint64_t bb_getsize_in_512sect(int fd)
} else {
/* BLKGETSIZE failed, assume this is a disk image */
#if ENABLE_FDISK_SUPPORT_LARGE_DISKS
- off64_t sz = xlseek64(fd, 0, SEEK_END);
+ off64_t sz = lseek64(fd, 0, SEEK_END);
+ if (sz == (off64_t)-1)
+ bb_perror_msg_and_die("lseek(%"OFF_FMT"u, %d)", 0, SEEK_END);
#else
off_t sz = xlseek(fd, 0, SEEK_END);
#endif