xref: /OK3568_Linux_fs/buildroot/package/sg3_utils/0001-src-sg_dd.c-fix-musl-build.patch (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1From c93ad13ecd8ddfbb8bb3e4d5d5ad7f3f2c633db6 Mon Sep 17 00:00:00 2001
2From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
3Date: Sun, 14 Nov 2021 12:37:16 +0100
4Subject: [PATCH] src/sg_dd.c: fix musl build
5
6Fix the following build failure on musl raised since version 1.47 and
7https://github.com/doug-gilbert/sg3_utils/commit/f0195003bb0c66ba55084b2f7e0fe982f08c5675:
8
9sg_dd.c: In function 'main':
10sg_dd.c:2402:17: error: unknown type name 'uint'; did you mean 'int'?
11 2402 |                 uint off;
12      |                 ^~~~
13      |                 int
14
15Fixes:
16 - http://autobuild.buildroot.org/results/9ead59ffefefe2a4e3b94a153b3d23231736d882
17
18Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
19[Upstream status: https://github.com/doug-gilbert/sg3_utils/pull/7]
20---
21 src/sg_dd.c | 2 +-
22 1 file changed, 1 insertion(+), 1 deletion(-)
23
24diff --git a/src/sg_dd.c b/src/sg_dd.c
25index 9d05c93..35e2423 100644
26--- a/src/sg_dd.c
27+++ b/src/sg_dd.c
28@@ -2399,7 +2399,7 @@ main(int argc, char * argv[])
29             res = blocks * blk_sz;
30             if (iflag.zero && iflag.ff && (blk_sz >= 4)) {
31                 uint32_t pos = (uint32_t)skip;
32-                uint off;
33+                uint32_t off;
34
35                 for (k = 0, off = 0; k < blocks; ++k, off += blk_sz, ++pos) {
36                     for (j = 0; j < (blk_sz - 3); j += 4)
37--
382.33.0
39
40