diff --git a/patch1.patch b/patch1.patch new file mode 100644 index 0000000..bd0bfb0 --- /dev/null +++ b/patch1.patch @@ -0,0 +1,23 @@ +From: Steinar H. Gunderson +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(ptr) + ret; + len -= ret; +- offset -= ret; ++ offset += ret; + } + return true; + } diff --git a/plocate.spec b/plocate.spec index 3c78e72..76e84d9 100644 --- a/plocate.spec +++ b/plocate.spec @@ -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