Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 1 | From c6ff7feb9038d6e8aaffe2e69b205ad5fa33df2f Mon Sep 17 00:00:00 2001 |
| 2 | From: Paul Barker <paul@paulbarker.me.uk> |
| 3 | Date: Mon, 18 Aug 2014 21:02:56 +0200 |
| 4 | Subject: [PATCH] Fix musl build failures |
| 5 | |
| 6 | In lib/ext2fs/unix_io.c, __u64 should be used instead of __uint64_t. This type |
| 7 | is guaranteed by the e2fsprogs build system. |
| 8 | (795c02def3681a99cc792a5ebc162d06f8a1eeb7) |
| 9 | |
| 10 | In misc/create_inode.c, <limits.h> is needed for the definition of PATH_MAX. |
| 11 | (bbccc6f3c6a106721fb6f1ef4df6bc32c7986235) |
| 12 | |
| 13 | Both of these fixes have been made upstream with the git commit IDs given but |
| 14 | those are larger commits containing other changes not needed here. |
| 15 | |
| 16 | Signed-off-by: Paul Barker <paul@paulbarker.me.uk> |
| 17 | |
| 18 | Upstream-Status: Backport |
| 19 | --- |
| 20 | lib/ext2fs/unix_io.c | 6 +++--- |
| 21 | misc/create_inode.c | 1 + |
| 22 | 2 files changed, 4 insertions(+), 3 deletions(-) |
| 23 | |
| 24 | diff --git a/lib/ext2fs/unix_io.c b/lib/ext2fs/unix_io.c |
| 25 | index 19be630..0cc0f52 100644 |
| 26 | --- a/lib/ext2fs/unix_io.c |
| 27 | +++ b/lib/ext2fs/unix_io.c |
| 28 | @@ -931,10 +931,10 @@ static errcode_t unix_discard(io_channel channel, unsigned long long block, |
| 29 | |
| 30 | if (channel->flags & CHANNEL_FLAGS_BLOCK_DEVICE) { |
| 31 | #ifdef BLKDISCARD |
| 32 | - __uint64_t range[2]; |
| 33 | + __u64 range[2]; |
| 34 | |
| 35 | - range[0] = (__uint64_t)(block) * channel->block_size; |
| 36 | - range[1] = (__uint64_t)(count) * channel->block_size; |
| 37 | + range[0] = (__u64)(block) * channel->block_size; |
| 38 | + range[1] = (__u64)(count) * channel->block_size; |
| 39 | |
| 40 | ret = ioctl(data->dev, BLKDISCARD, &range); |
| 41 | #else |
| 42 | diff --git a/misc/create_inode.c b/misc/create_inode.c |
| 43 | index 6d8de04..fcec5aa 100644 |
| 44 | --- a/misc/create_inode.c |
| 45 | +++ b/misc/create_inode.c |
| 46 | @@ -1,4 +1,5 @@ |
| 47 | #include "create_inode.h" |
| 48 | +#include <limits.h> |
| 49 | |
| 50 | #if __STDC_VERSION__ < 199901L |
| 51 | # if __GNUC__ >= 2 |
| 52 | -- |
| 53 | 1.9.1 |
| 54 | |