[PATCH] uClibc & BLKGETSIZE64

Yann E. MORIN yann.morin.1998 at anciens.enib.fr
Sun Jun 4 12:55:12 UTC 2006


Hello all!

The attached patch shall solve the following problem when compiling with
hdparm enabled with a uClibc-based toolchain:

/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.)

The patch defines BLKGETSIZE64 conditionnaly to:
  - this is linux,
  - this is uClibc,
  - we do not have BLKGETSIZE64.

I'm not quite sure this is the correct and complete fix, as e2fsprogs and
fdisk do redefine it by themselves. They shall also be fixed to not do so, but
should include platform.h instead. I'll leave to the respective maintainers to
do that (I'm not really willing to dig in those two pieces of code).

Also, future uClibc's might switch to defining this, but sys/mount.h has not
changed for the last 4 years or so, which leads me to think it won't in the
near future... Shall I ask there as well?

Regards,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +0/33 662376056 | Software  Designer | \ / CAMPAIGN     |   ^                |
| --==< °_° >==-- °---.----------------:  X  AGAINST      |  /e\  There is no  |
| web: ymorin.free.fr | SETI at home 3808 | / \ HTML MAIL    |  """  conspiracy.  |
°---------------------°----------------°------------------°--------------------°
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 005-BLKGETSIZE64.patch
Type: text/x-diff
Size: 650 bytes
Desc: not available
Url : http://lists.busybox.net/pipermail/busybox/attachments/20060604/81fa7beb/attachment.bin 


More information about the busybox mailing list