View | Details | Raw Unified | Return to bug 214640
Collapse All | Expand All

(-)multimedia/k9copy-kde4/files/patch-src_backup_k9dvdbackup.cpp (+25 lines)
Line 0 Link Here
1
/wrkdirs/usr/ports/multimedia/k9copy-kde4/work/k9copy-2.3.4-Source/src/backup/k9dvdbackup.cpp:888:24: error: call to 'abs' is ambiguous
2
            *_offset = abs(vobu1->newSector - vobu2->newSector)  | maskOffset1 ;
3
                       ^~~
4
/usr/include/stdlib.h:83:6: note: candidate function
5
int      abs(int) __pure2;
6
         ^
7
/usr/include/c++/v1/stdlib.h:115:44: note: candidate function
8
inline _LIBCPP_INLINE_VISIBILITY long      abs(     long __x) _NOEXCEPT {return  labs(__x);}
9
                                           ^
10
/usr/include/c++/v1/stdlib.h:117:44: note: candidate function
11
inline _LIBCPP_INLINE_VISIBILITY long long abs(long long __x) _NOEXCEPT {return llabs(__x);}
12
                                           ^
13
14
--- src/backup/k9dvdbackup.cpp.orig	2016-11-18 20:25:13 UTC
15
+++ src/backup/k9dvdbackup.cpp
16
@@ -885,7 +885,8 @@ k9Vobu * k9DVDBackup::remapOffset(uint32
17
 
18
 
19
         if ((vobu1 !=NULL) && (vobu2!=NULL)) {
20
-            *_offset = abs(vobu1->newSector - vobu2->newSector)  | maskOffset1 ;
21
+            uint32_t delta = ( vobu1->newSector > vobu2->newSector ? vobu1->newSector - vobu2->newSector : vobu2->newSector - vobu1->newSector );
22
+            *_offset = delta  | maskOffset1 ;
23
             *_offset |= maskOffset2;
24
             return vobu2;
25
         }

Return to bug 214640