diff options
Diffstat (limited to 'meta/recipes-devtools/strace/strace/0002-tests-Replace-off64_t-with-off_t.patch')
-rw-r--r-- | meta/recipes-devtools/strace/strace/0002-tests-Replace-off64_t-with-off_t.patch | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/meta/recipes-devtools/strace/strace/0002-tests-Replace-off64_t-with-off_t.patch b/meta/recipes-devtools/strace/strace/0002-tests-Replace-off64_t-with-off_t.patch new file mode 100644 index 0000000000..0cabdfe99f --- /dev/null +++ b/meta/recipes-devtools/strace/strace/0002-tests-Replace-off64_t-with-off_t.patch | |||
@@ -0,0 +1,52 @@ | |||
1 | From 579b2ebe52d4b97f954e6188df2d07e137820075 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Thu, 15 Dec 2022 15:56:13 -0800 | ||
4 | Subject: [PATCH] tests: Replace off64_t with off_t | ||
5 | |||
6 | when _FILE_OFFSET_BITS=64 then off_t is 64bit wide, this also fixes | ||
7 | build on musl where off64_t is not available without _LARGEFILE64_SOURCE | ||
8 | |||
9 | Upstream-Status: Submitted [https://github.com/strace/strace/pull/230] | ||
10 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
11 | --- | ||
12 | tests/readahead.c | 2 +- | ||
13 | tests/sync_file_range2.c | 4 ++-- | ||
14 | 2 files changed, 3 insertions(+), 3 deletions(-) | ||
15 | |||
16 | --- a/tests/readahead.c | ||
17 | +++ b/tests/readahead.c | ||
18 | @@ -42,7 +42,7 @@ static const int fds[] = { | ||
19 | 0x7fffffff, | ||
20 | }; | ||
21 | |||
22 | -static const off64_t offsets[] = { | ||
23 | +static const off_t offsets[] = { | ||
24 | -0x8000000000000000LL, | ||
25 | -0x5060708090a0b0c0LL, | ||
26 | -1LL, | ||
27 | --- a/tests/sync_file_range2.c | ||
28 | +++ b/tests/sync_file_range2.c | ||
29 | @@ -20,8 +20,8 @@ int | ||
30 | main(void) | ||
31 | { | ||
32 | const int fd = -1; | ||
33 | - const off64_t offset = 0xdeadbeefbadc0ded; | ||
34 | - const off64_t nbytes = 0xfacefeedcafef00d; | ||
35 | + const off_t offset = 0xdeadbeefbadc0ded; | ||
36 | + const off_t nbytes = 0xfacefeedcafef00d; | ||
37 | const unsigned int flags = -1; | ||
38 | |||
39 | int rc = sync_file_range(fd, offset, nbytes, flags); | ||
40 | --- a/tests/sync_file_range.c | ||
41 | +++ b/tests/sync_file_range.c | ||
42 | @@ -20,8 +20,8 @@ int | ||
43 | main(void) | ||
44 | { | ||
45 | const int fd = -1; | ||
46 | - const off64_t offset = 0xdeadbeefbadc0dedULL; | ||
47 | - const off64_t nbytes = 0xfacefeedcafef00dULL; | ||
48 | + const off_t offset = 0xdeadbeefbadc0dedULL; | ||
49 | + const off_t nbytes = 0xfacefeedcafef00dULL; | ||
50 | const unsigned int flags = -1; | ||
51 | |||
52 | int rc = sync_file_range(fd, offset, nbytes, flags); | ||