summaryrefslogtreecommitdiffstats
path: root/openbsd-compat/bsd-misc.c
diff options
context:
space:
mode:
authorDarren Tucker <dtucker@zip.com.au>2017-03-20 03:38:27 +0100
committerDarren Tucker <dtucker@zip.com.au>2017-03-20 03:39:27 +0100
commitd38f05dbdd291212bc95ea80648b72b7177e9f4e (patch)
treea168524bf423b2462c481e0c204ca9b5d0755a96 /openbsd-compat/bsd-misc.c
parentcrank version numbers (diff)
downloadopenssh-d38f05dbdd291212bc95ea80648b72b7177e9f4e.tar.xz
openssh-d38f05dbdd291212bc95ea80648b72b7177e9f4e.zip
Add llabs() implementation.V_7_5_P1
Diffstat (limited to 'openbsd-compat/bsd-misc.c')
-rw-r--r--openbsd-compat/bsd-misc.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/openbsd-compat/bsd-misc.c b/openbsd-compat/bsd-misc.c
index 6f3bc8f1d..cfd73260a 100644
--- a/openbsd-compat/bsd-misc.c
+++ b/openbsd-compat/bsd-misc.c
@@ -301,3 +301,11 @@ mbtowc(wchar_t *pwc, const char *s, size_t n)
return 1;
}
#endif
+
+#ifndef HAVE_LLABS
+long long
+llabs(long long j)
+{
+ return (j < 0 ? -j : j);
+}
+#endif