pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/audio/cdparanoia/patches cdparanoia: fix warnings with...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/783a6ec25a02
branches:  trunk
changeset: 385714:783a6ec25a02
user:      triaxx <triaxx%pkgsrc.org@localhost>
date:      Thu Sep 27 19:35:08 2018 +0000

description:
cdparanoia: fix warnings with abs() on FreeBSD

diffstat:

 audio/cdparanoia/patches/patch-paranoia_overlap.c |  30 +++++++++++++++++++++++
 1 files changed, 30 insertions(+), 0 deletions(-)

diffs (34 lines):

diff -r dc9901f9e546 -r 783a6ec25a02 audio/cdparanoia/patches/patch-paranoia_overlap.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/audio/cdparanoia/patches/patch-paranoia_overlap.c Thu Sep 27 19:35:08 2018 +0000
@@ -0,0 +1,30 @@
+$NetBSD: patch-paranoia_overlap.c,v 1.1 2018/09/27 19:35:08 triaxx Exp $
+
+Fix lossy conversion with abs() on FreeBSD.
+
+--- paranoia/overlap.c.orig    2008-08-06 18:27:41.000000000 +0000
++++ paranoia/overlap.c
+@@ -107,7 +107,11 @@ void offset_adjust_settings(cdrom_parano
+        sector, frob it.  We just want a little hysteresis [sp?]*/
+     long av=(p->stage2.offpoints?p->stage2.offaccum/p->stage2.offpoints:0);
+     
++#if defined(__FreeBSD__)
++    if(labs(av)>p->dynoverlap/4){
++#else
+     if(abs(av)>p->dynoverlap/4){
++#endif
+       av=(av/MIN_SECTOR_EPSILON)*MIN_SECTOR_EPSILON;
+       
+       if(callback)(*callback)(ce(p->root.vector),PARANOIA_CB_DRIFT);
+@@ -207,7 +211,11 @@ void offset_add_value(cdrom_paranoia *p,
+   if(o->offpoints!=-1){
+ 
+     /* Track the average magnitude of jitter (in either direction) */
++#if defined(__FreeBSD__)
++    o->offdiff+=labs(value);
++#else
+     o->offdiff+=abs(value);
++#endif
+     o->offpoints++;
+     o->newpoints++;
+ 



Home | Main Index | Thread Index | Old Index