python3Packages.orjson: Disable failing tests on 32 bit
[NixPkgs.git] / pkgs / tools / misc / coreutils / disable-seek-hole.patch
blob89503287980d4ca654e2eb767ba39d8edfd77145
1 diff --git a/src/copy.c b/src/copy.c
2 index cb9018f93..2a4ccc061 100644
3 --- a/src/copy.c
4 +++ b/src/copy.c
5 @@ -502,7 +502,7 @@ write_zeros (int fd, off_t n_bytes)
6 return true;
9 -#ifdef SEEK_HOLE
10 +#if 0
11 /* Perform an efficient extent copy, if possible. This avoids
12 the overhead of detecting holes in hole-introducing/preserving
13 copy, and thus makes copying sparse files much more efficient.
14 @@ -1095,7 +1095,7 @@ infer_scantype (int fd, struct stat const *sb,
15 && ST_NBLOCKS (*sb) < sb->st_size / ST_NBLOCKSIZE))
16 return PLAIN_SCANTYPE;
18 -#ifdef SEEK_HOLE
19 +#if 0
20 scan_inference->ext_start = lseek (fd, 0, SEEK_DATA);
21 if (0 <= scan_inference->ext_start)
22 return LSEEK_SCANTYPE;
23 @@ -1377,7 +1377,7 @@ copy_reg (char const *src_name, char const *dst_name,
24 off_t n_read;
25 bool wrote_hole_at_eof = false;
26 if (! (
27 -#ifdef SEEK_HOLE
28 +#if 0
29 scantype == LSEEK_SCANTYPE
30 ? lseek_copy (source_desc, dest_desc, buf, buf_size, hole_size,
31 scan_inference.ext_start, src_open_sb.st_size,
32 diff --git a/tests/seek-data-capable b/tests/seek-data-capable
33 index cc6372214..6e7a9ec1e 100644
34 --- a/tests/seek-data-capable
35 +++ b/tests/seek-data-capable
36 @@ -1,5 +1,7 @@
37 import sys, os, errno, platform
39 +sys.exit(1)
41 # Pass an _empty_ file
42 if len(sys.argv) != 2:
43 sys.exit(1)