bug-ddrescue
[Top][All Lists]
Advanced

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

Re: error: call of overloaded 'abs(const long long int&)' is ambiguous


From: Antonio Diaz Diaz
Subject: Re: error: call of overloaded 'abs(const long long int&)' is ambiguous
Date: Thu, 08 Aug 2024 15:41:56 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i586; en-US; rv:1.9.1.19) Gecko/20110420 SeaMonkey/2.0.14

Bon dia, Jordi,

Jordi Sanfeliu wrote:
Since version 1.26 I'm unable to build 'ddrescue' (that is versions
1.26, 1.27 and 1.28) on my hobbyOS FiwixOS (https://www.fiwix.org).
Version 1.25 compiled successfully.

I'm using GCC 4.7.4 on FiwixOS 3.3:

Thank you very much for reporting this. The problem seems to be that your compiler only knows about int and long versions of std::abs. The fix is easy. Just change 'std::abs' to 'llabs' in line 178 of ddrescuelog.cc:

-  if( std::abs( offset ) % hardbs )
+  if( llabs( offset ) % hardbs )

Best regards,
Antonio.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]