diff options
| author | Khem Raj <raj.khem@gmail.com> | 2023-03-11 23:07:49 -0800 |
|---|---|---|
| committer | Khem Raj <raj.khem@gmail.com> | 2023-03-11 23:08:48 -0800 |
| commit | d9070bf4540a34348e4423c3cbe092533584e500 (patch) | |
| tree | 628141c179e4f1f89495e674f7a6bcaef5b49569 /meta-oe/recipes-support/sg3-utils | |
| parent | fba1ec08a7ce7b0b0ddc05bcdca666d82c574596 (diff) | |
| download | meta-openembedded-d9070bf4540a34348e4423c3cbe092533584e500.tar.gz | |
sg3-utils: Fix build with musl
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-oe/recipes-support/sg3-utils')
| -rw-r--r-- | meta-oe/recipes-support/sg3-utils/sg3-utils/0001-sg_dd.c-Use-off_t-instead-of-uint.patch | 36 | ||||
| -rw-r--r-- | meta-oe/recipes-support/sg3-utils/sg3-utils_1.47.bb | 2 |
2 files changed, 37 insertions, 1 deletions
diff --git a/meta-oe/recipes-support/sg3-utils/sg3-utils/0001-sg_dd.c-Use-off_t-instead-of-uint.patch b/meta-oe/recipes-support/sg3-utils/sg3-utils/0001-sg_dd.c-Use-off_t-instead-of-uint.patch new file mode 100644 index 0000000000..317876f197 --- /dev/null +++ b/meta-oe/recipes-support/sg3-utils/sg3-utils/0001-sg_dd.c-Use-off_t-instead-of-uint.patch | |||
| @@ -0,0 +1,36 @@ | |||
| 1 | From 9a8ede03ef61cdf527ce3a80771150a7452e4603 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Khem Raj <raj.khem@gmail.com> | ||
| 3 | Date: Sat, 11 Mar 2023 22:56:17 -0800 | ||
| 4 | Subject: [PATCH] sg_dd.c: Use off_t instead of uint | ||
| 5 | |||
| 6 | uint is not available on every platform e.g. linux/musl systems. Use | ||
| 7 | uint32_t instead to represent 'off' variable, Fixes | ||
| 8 | |||
| 9 | sg_dd.c:2402:17: error: use of undeclared identifier 'uint'; did you mean 'int'? | ||
| 10 | uint off; | ||
| 11 | ^~~~ | ||
| 12 | int | ||
| 13 | 1 error generated. | ||
| 14 | |||
| 15 | Upstream-Status: Pending | ||
| 16 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
| 17 | --- | ||
| 18 | src/sg_dd.c | 2 +- | ||
| 19 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
| 20 | |||
| 21 | diff --git a/src/sg_dd.c b/src/sg_dd.c | ||
| 22 | index 9d05c93..35e2423 100644 | ||
| 23 | --- a/src/sg_dd.c | ||
| 24 | +++ b/src/sg_dd.c | ||
| 25 | @@ -2399,7 +2399,7 @@ main(int argc, char * argv[]) | ||
| 26 | res = blocks * blk_sz; | ||
| 27 | if (iflag.zero && iflag.ff && (blk_sz >= 4)) { | ||
| 28 | uint32_t pos = (uint32_t)skip; | ||
| 29 | - uint off; | ||
| 30 | + uint32_t off; | ||
| 31 | |||
| 32 | for (k = 0, off = 0; k < blocks; ++k, off += blk_sz, ++pos) { | ||
| 33 | for (j = 0; j < (blk_sz - 3); j += 4) | ||
| 34 | -- | ||
| 35 | 2.39.2 | ||
| 36 | |||
diff --git a/meta-oe/recipes-support/sg3-utils/sg3-utils_1.47.bb b/meta-oe/recipes-support/sg3-utils/sg3-utils_1.47.bb index fe129b8ed3..1aa65e6cc4 100644 --- a/meta-oe/recipes-support/sg3-utils/sg3-utils_1.47.bb +++ b/meta-oe/recipes-support/sg3-utils/sg3-utils_1.47.bb | |||
| @@ -9,7 +9,7 @@ LICENSE = "GPL-2.0-or-later & BSD-2-Clause" | |||
| 9 | LIC_FILES_CHKSUM = "file://COPYING;md5=f685699d3ac82f108aa880043fa3feb7" | 9 | LIC_FILES_CHKSUM = "file://COPYING;md5=f685699d3ac82f108aa880043fa3feb7" |
| 10 | 10 | ||
| 11 | SRC_URI = "http://sg.danny.cz/sg/p/sg3_utils-${PV}.tgz \ | 11 | SRC_URI = "http://sg.danny.cz/sg/p/sg3_utils-${PV}.tgz \ |
| 12 | " | 12 | file://0001-sg_dd.c-Use-off_t-instead-of-uint.patch" |
| 13 | MIRRORS += "http://sg.danny.cz/sg/p https://fossies.org/linux/misc" | 13 | MIRRORS += "http://sg.danny.cz/sg/p https://fossies.org/linux/misc" |
| 14 | 14 | ||
| 15 | UPSTREAM_CHECK_REGEX = "sg3_utils-(?P<pver>\d+(\.\d+)+)\.tgz" | 15 | UPSTREAM_CHECK_REGEX = "sg3_utils-(?P<pver>\d+(\.\d+)+)\.tgz" |
