[BUG] hdparm & uClibc: BLKGETSIZE64 undeclared

Bernhard Fischer rep.nop at aon.at
Sat Jun 3 15:51:20 PDT 2006


On Sun, Jun 04, 2006 at 12:43:30AM +0200, Yann E. MORIN wrote:
>Hello all!
>
>Before I surrender to Morpheus, here is a nitpick in hdparm:
>
>/home/ymorin/dev/src/busybox-svn/miscutils/hdparm.c: In function `do_blkgetsize':
>/home/ymorin/dev/src/busybox-svn/miscutils/hdparm.c:1373: error: `BLKGETSIZE64' undeclared (first use in this function)
>/home/ymorin/dev/src/busybox-svn/miscutils/hdparm.c:1373: error: (Each undeclared identifier is reported only once
>/home/ymorin/dev/src/busybox-svn/miscutils/hdparm.c:1373: error: for each function it appears in.)
>
>Toolchain is:
>binutils-2.16.1
>gcc-3.4.4
>uClibc-0.9.28
>linux-libc-headers-2.6.12.0
>
>Target is armv5b-nslu2-linux-uclibc
>
>In glibc, BLKGETSIZE64 is defined in sys/mount.h
>In linux headers, it is defined in linux/fs.h
>In uClibc, it is not defined anywhere.
>
>In busybox, we do (re)define it in:
>e2fsprogs/blkid/blkid_getsize.c:48
>e2fsprogs/ext2fs/getsize.c:47
>util-linux/fdisk.c:55
>
>What is the best solution here?

I'd say that's a typical case for platform.h, either in the
libc-checking section where you'd want to include sys/mount.h if
you know that your libc provides it or in a __linux__ block where you
copy the #define out of linux/fs.h.
>
>Regards, and for those in the same area as me, good night, and sleep well!

Should do that too now. g'night all


More information about the busybox mailing list