diff options
| author | Alexander Langer <alex@FreeBSD.org> | 1997-01-16 21:58:40 +0000 |
|---|---|---|
| committer | Alexander Langer <alex@FreeBSD.org> | 1997-01-16 21:58:40 +0000 |
| commit | 8abdc2eb40c03b97153f2a01bdb53927f3a336c1 (patch) | |
| tree | d61898dd79824c10ca33127214d8569c804559c2 /usr.bin/cmp | |
| parent | 839cc09e5384e6f8c0ebb9203052015b532cfce7 (diff) | |
Notes
Diffstat (limited to 'usr.bin/cmp')
| -rw-r--r-- | usr.bin/cmp/regular.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/cmp/regular.c b/usr.bin/cmp/regular.c index 5d301fad6bb92..f540ab4aebe8a 100644 --- a/usr.bin/cmp/regular.c +++ b/usr.bin/cmp/regular.c @@ -80,12 +80,12 @@ c_regular(fd1, file1, skip1, len1, fd2, file2, skip2, len2) return (c_special(fd1, file1, skip1, fd2, file2, skip2)); if ((p1 = (u_char *)mmap(NULL, - (size_t)length, PROT_READ, 0, fd1, off1)) == (u_char *)-1) + (size_t)length, PROT_READ, MAP_SHARED, fd1, off1)) == (u_char *)MAP_FAILED) err(ERR_EXIT, "%s", file1); madvise(p1, length, MADV_SEQUENTIAL); if ((p2 = (u_char *)mmap(NULL, - (size_t)length, PROT_READ, 0, fd2, off2)) == (u_char *)-1) + (size_t)length, PROT_READ, MAP_SHARED, fd2, off2)) == (u_char *)MAP_FAILED) err(ERR_EXIT, "%s", file2); madvise(p2, length, MADV_SEQUENTIAL); |
