blob: 0cabdfe99f84da5093752898bd9d81ff9b90a51e [file] [log] [blame]
Andrew Geissler517393d2023-01-13 08:55:19 -06001From 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
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);