Opened 9 years ago

Closed 9 years ago

#946 closed task (wontfix)

Verify if e2fsprogs needs changes for __uint64_t type

Reported by: Andrew Bradford Owned by: Andrew Bradford
Priority: major Milestone: CLFS Embedded 1.0.0
Component: BOOK Version: CLFS Embedded GIT
Keywords: Cc:


e2fsprogs uses the __uint64_t type, which is a valid typedef in glibc for unsigned long long int on 32 bit platforms but appears to not be present in musl.


Change History (4)

comment:1 Changed 9 years ago by Andrew Bradford

Owner: changed from clfs-commits@… to Andrew Bradford
Status: newassigned

comment:2 Changed 9 years ago by Andrew Bradford

There's only 1 function in e2fsprogs that uses __uint64_t and there appears to be no reason to do so. Changing this one function to use uint64_t instead (but *NOT* unsigned long long int) should fix the issue for all 32 and 64 bit platforms.

diff -Naur e2fsprogs-1.42.8.orig/lib/ext2fs/unix_io.c e2fsprogs-1.42.8/lib/ext2fs/unix_io.c
--- e2fsprogs-1.42.8.orig/lib/ext2fs/unix_io.c	2013-10-24 15:50:44.234297410 -0400
+++ e2fsprogs-1.42.8/lib/ext2fs/unix_io.c	2013-10-24 16:29:06.436142156 -0400
@@ -931,10 +931,10 @@
 	if (channel->flags & CHANNEL_FLAGS_BLOCK_DEVICE) {
-		__uint64_t range[2];
+		uint64_t range[2];
-		range[0] = (__uint64_t)(block) * channel->block_size;
-		range[1] = (__uint64_t)(count) * channel->block_size;
+		range[0] = (uint64_t)(block) * channel->block_size;
+		range[1] = (uint64_t)(count) * channel->block_size;
 		ret = ioctl(data->dev, BLKDISCARD, &range);

comment:3 Changed 9 years ago by William Harrington

I'm working with the Raspberry Pi, you sent me, and this I had to apply for E2fsprogs. 1.42.7 and 1.42.8.

comment:4 Changed 9 years ago by Andrew Bradford

Resolution: wontfix
Status: assignedclosed

e2fsprogs have been removed from the beyond section of the 20140613 book, making this ticket no longer needed.

Note: See TracTickets for help on using tickets.