Pull in patch to fix bug

This commit is contained in:
Zbigniew Jędrzejewski-Szmek 2021-05-12 15:13:33 +02:00
parent c059fa80b2
commit aba5696344
2 changed files with 25 additions and 1 deletions

23
patch1.patch Normal file
View File

@ -0,0 +1,23 @@
From: Steinar H. Gunderson <steinar+git@gunderson.no>
Date: Wed, 7 Apr 2021 20:04:49 +0000 (+0200)
Subject: Fix a typo in try_complete_pread().
X-Git-Url: https://git.sesse.net/?p=plocate;a=commitdiff_plain;h=5306f44831f52aadc17ef229a8e577147c68137b
Fix a typo in try_complete_pread().
Pointed out by Taj Khattra.
---
diff --git a/complete_pread.cpp b/complete_pread.cpp
index e805cf6..3b36945 100644
--- a/complete_pread.cpp
+++ b/complete_pread.cpp
@@ -15,7 +15,7 @@ bool try_complete_pread(int fd, void *ptr, size_t len, off_t offset)
}
ptr = reinterpret_cast<char *>(ptr) + ret;
len -= ret;
- offset -= ret;
+ offset += ret;
}
return true;
}

View File

@ -7,6 +7,7 @@ License: GPLv2+
URL: https://plocate.sesse.net/
Source0: https://git.sesse.net/?p=plocate;a=snapshot;h=%{version};sf=tgz#/plocate-%{version}.tar.gz
%global shortcommit 877be5c
Patch1: https://git.sesse.net/?p=plocate;a=commitdiff_plain;h=5306f44831f52aadc17ef229a8e577147c68137b#/patch1.patch
Source1: plocate.sysusers
BuildRequires: meson
@ -28,7 +29,7 @@ searches on a much smaller index. It is a drop-in replacement for
mlocate in nearly all aspects, and is fast on SSDs and non-SSDs alike.
%prep
%autosetup -n plocate-%{version}-%{shortcommit}
%autosetup -n plocate-%{version}-%{shortcommit} -p1
%build
%meson