mirror of
https://github.com/opnsense/src.git
synced 2026-04-22 14:49:36 -04:00
kern: Globally define abs64
So we can use it in non-linuxkpi sources. Reviewed by: emaste, mmel Differential Revision: https://reviews.freebsd.org/D41767 Sponsored by: Beckhoff Automation GmbH & Co. KG (cherry picked from commit 229c65a83fbe0ede8c617e35d8f8c14d5ebadc19)
This commit is contained in:
parent
f829556e3b
commit
15314c51e8
2 changed files with 1 additions and 6 deletions
|
|
@ -623,12 +623,6 @@ mult_frac(uintmax_t x, uintmax_t multiplier, uintmax_t divisor)
|
|||
return ((q * multiplier) + ((r * multiplier) / divisor));
|
||||
}
|
||||
|
||||
static inline int64_t
|
||||
abs64(int64_t x)
|
||||
{
|
||||
return (x < 0 ? -x : x);
|
||||
}
|
||||
|
||||
typedef struct linux_ratelimit {
|
||||
struct timeval lasttime;
|
||||
int counter;
|
||||
|
|
|
|||
|
|
@ -113,6 +113,7 @@ static __inline off_t omax(off_t a, off_t b) { return (a > b ? a : b); }
|
|||
static __inline off_t omin(off_t a, off_t b) { return (a < b ? a : b); }
|
||||
static __inline int abs(int a) { return (a < 0 ? -a : a); }
|
||||
static __inline long labs(long a) { return (a < 0 ? -a : a); }
|
||||
static __inline int64_t abs64(int64_t a) { return (a < 0 ? -a : a); }
|
||||
static __inline quad_t qabs(quad_t a) { return (a < 0 ? -a : a); }
|
||||
|
||||
#ifndef RANDOM_FENESTRASX
|
||||
|
|
|
|||
Loading…
Reference in a new issue