summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/strace/strace/0002-tests-Replace-off64_t-with-off_t.patch
diff options
context:
space:
mode:
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.patch43
1 files changed, 43 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..ce0428e977
--- /dev/null
+++ b/meta/recipes-devtools/strace/strace/0002-tests-Replace-off64_t-with-off_t.patch
@@ -0,0 +1,43 @@
1From 579b2ebe52d4b97f954e6188df2d07e137820075 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Thu, 15 Dec 2022 15:56:13 -0800
4Subject: [PATCH] tests: Replace off64_t with off_t
5
6when _FILE_OFFSET_BITS=64 then off_t is 64bit wide, this also fixes
7build on musl where off64_t is not available without _LARGEFILE64_SOURCE
8
9Upstream-Status: Submitted [https://github.com/strace/strace/pull/230]
10Signed-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
16diff --git a/tests/readahead.c b/tests/readahead.c
17index 10723785c..b9597e697 100644
18--- a/tests/readahead.c
19+++ b/tests/readahead.c
20@@ -42,7 +42,7 @@ static const int fds[] = {
21 0x7fffffff,
22 };
23
24-static const off64_t offsets[] = {
25+static const off_t offsets[] = {
26 -0x8000000000000000LL,
27 -0x5060708090a0b0c0LL,
28 -1LL,
29diff --git a/tests/sync_file_range2.c b/tests/sync_file_range2.c
30index 0f7c9e428..15a5fec71 100644
31--- a/tests/sync_file_range2.c
32+++ b/tests/sync_file_range2.c
33@@ -20,8 +20,8 @@ int
34 main(void)
35 {
36 const int fd = -1;
37- const off64_t offset = 0xdeadbeefbadc0ded;
38- const off64_t nbytes = 0xfacefeedcafef00d;
39+ const off_t offset = 0xdeadbeefbadc0ded;
40+ const off_t nbytes = 0xfacefeedcafef00d;
41 const unsigned int flags = -1;
42
43 int rc = sync_file_range(fd, offset, nbytes, flags);