--- /dev/null
+From 97380f009b0e6a8bb6ee4ecbf0436045342cdf1e Mon Sep 17 00:00:00 2001
+From: abishai <abi@abinet.ru>
+Date: Tue, 31 Jan 2017 10:42:57 +0300
+Subject: [PATCH] implement platform-agnostic comparison without abs()
+
+---
+ src/zm_image.cpp | 8 +++-----
+ 1 file changed, 3 insertions(+), 5 deletions(-)
+
+diff --git a/src/zm_image.cpp b/src/zm_image.cpp
+index 9c8c12fda..80a821376 100644
+--- a/src/zm_image.cpp
++++ b/src/zm_image.cpp
+@@ -1658,11 +1658,9 @@ Image *Image::Highlight( unsigned int n_images, Image *images[], const Rgb thres
+ {
+ uint8_t *psrc = images[j]->buffer+c;
+
+-#ifndef SOLARIS
+- if ( (unsigned)abs((*psrc)-RGB_VAL(ref_colour,c)) >= RGB_VAL(threshold,c) )
+-#else
+- if ( (unsigned)std::abs((*psrc)-RGB_VAL(ref_colour,c)) >= RGB_VAL(threshold,c) )
+-#endif
++ unsigned int diff = ((*psrc)-RGB_VAL(ref_colour,c)) > 0 ? (*psrc)-RGB_VAL(ref_colour,c) : RGB_VAL(ref_colour,c) - (*psrc);
++
++ if (diff >= RGB_VAL(threshold,c))
+ {
+ count++;
+ }
--- /dev/null
+From 417421b1d869d1b71c8ec1a1e3b082fcede6ce58 Mon Sep 17 00:00:00 2001
+From: Andrew Bauer <zonexpertconsulting@outlook.com>
+Date: Tue, 13 Jun 2017 14:39:12 -0500
+Subject: [PATCH] move include <sys/uio.h> outside defined(BSD) block (#1919)
+
+---
+ src/zm_comms.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/zm_comms.h b/src/zm_comms.h
+index cf108c1ea..ae5fd5b08 100644
+--- a/src/zm_comms.h
++++ b/src/zm_comms.h
+@@ -30,9 +30,9 @@
+
+ #include <set>
+ #include <vector>
++#include <sys/uio.h>
+
+ #if defined(BSD)
+-#include <sys/uio.h>
+ #include <sys/socket.h>
+ #include <netinet/in.h>
+ #endif
-# Copyright 1999-2017 Gentoo Foundation
+# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# TO DO:
# webserver in global scope (/etc/zm.conf etc), so we hardcode apache here.
need_apache
-S=${WORKDIR}/${MY_PN}-${PV}
-
PATCHES=(
"${FILESDIR}/${PN}-1.30.2"-diskspace.patch
"${FILESDIR}/${PN}-1.30.4"-path_zms.patch
+ "${FILESDIR}/${PN}-1.30.4"-glibc226.patch
+ "${FILESDIR}/${PN}-1.30.4"-gcc7.patch
)
MY_ZM_WEBDIR=/usr/share/zoneminder/www