diff options
author | Khem Raj <raj.khem@gmail.com> | 2020-06-09 22:10:28 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2020-06-12 08:25:04 +0100 |
commit | 8b7d512b40d7d66f7f7ae9965488c36f8b0fcc0e (patch) | |
tree | bccb8f69147d9421b3a30eb5cde12abede0c8d28 /meta/recipes-extended/stress-ng/stress-ng/no_daddr_t.patch | |
parent | 4f3aca1a5660f8d4bc4342ba2838009a90647003 (diff) | |
download | poky-8b7d512b40d7d66f7f7ae9965488c36f8b0fcc0e.tar.gz |
stress-ng: Fix build on musl
Define daddr_t if not provided by system headers
Fixes
./stress-ng.h:3755:2: error: unknown type name 'daddr_t'; did you mean 'caddr_t'?
daddr_t f_tfree;
^~~~~~~
(From OE-Core rev: 51592bafececf2423747fccd183a556eaa17bcd7)
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-extended/stress-ng/stress-ng/no_daddr_t.patch')
-rw-r--r-- | meta/recipes-extended/stress-ng/stress-ng/no_daddr_t.patch | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/meta/recipes-extended/stress-ng/stress-ng/no_daddr_t.patch b/meta/recipes-extended/stress-ng/stress-ng/no_daddr_t.patch new file mode 100644 index 0000000000..877f4f0624 --- /dev/null +++ b/meta/recipes-extended/stress-ng/stress-ng/no_daddr_t.patch | |||
@@ -0,0 +1,22 @@ | |||
1 | Define daddr_t if __DADDR_T_TYPE is not defined | ||
2 | |||
3 | glibc defined daddr_t but musl does not, ideally it should not be used | ||
4 | and simple int type is enough. However, its better to leave glibc behavior | ||
5 | as it is and only define it to int if daddr_t is not provided by libc | ||
6 | |||
7 | Upstream-Status: Pending | ||
8 | |||
9 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
10 | --- a/stress-ng.h | ||
11 | +++ b/stress-ng.h | ||
12 | @@ -3750,6 +3750,10 @@ struct shim_statx { | ||
13 | uint64_t __spare2[14]; | ||
14 | }; | ||
15 | |||
16 | +#ifndef __DADDR_T_TYPE | ||
17 | +typedef int daddr_t; | ||
18 | +#endif | ||
19 | + | ||
20 | /* old ustat struct */ | ||
21 | struct shim_ustat { | ||
22 | daddr_t f_tfree; | ||