gentoo/app-admin/cpulimit/files/cpulimit-2.8-inline-func.patch
Azamat H. Hackimov 0fe5e537a7
app-admin/cpulimit: add 2.8
Migrate to EAPI8, building and compilation fixes.

Closes: https://bugs.gentoo.org/686528
Signed-off-by: Azamat H. Hackimov <azamat.hackimov@gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/29452
Signed-off-by: Conrad Kostecki <conikost@gentoo.org>
2023-04-23 17:47:40 +02:00

12 lines
454 B
Diff

--- a/cpulimit.c 2023-02-06 19:07:19.450894524 +0300
+++ b/cpulimit.c 2023-02-06 19:07:28.834337797 +0300
@@ -125,7 +125,7 @@
//return ta-tb in microseconds (no overflow checks!)
-inline long timediff(const struct timespec *ta,const struct timespec *tb) {
+static long timediff(const struct timespec *ta,const struct timespec *tb) {
unsigned long us = (ta->tv_sec-tb->tv_sec)*1000000 + (ta->tv_nsec/1000 - tb->tv_nsec/1000);
return us;
}