--- src/ZoneMinder-1.30.4/src/zm_image.cpp	2017-06-17 04:20:45.808503543 -0300
+++ src/ZoneMinder-1.30.4/src/zm_image.cpp.2	2017-06-17 04:20:40.221794330 -0300
@@ -1659,7 +1659,7 @@
         uint8_t *psrc = images[j]->buffer+c;
 
 #ifndef SOLARIS
-        if ( (unsigned)abs((*psrc)-RGB_VAL(ref_colour,c)) >= RGB_VAL(threshold,c) )
+        if ( (unsigned)fabs((*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