Fix build on armhf:
... ../../../source/gui/CDropDown.cpp: In member function 'virtual InReaction CDropDown::ManuallyHandleEvent(const SDL_Event_*)': ../../../source/gui/CDropDown.cpp:355:94: error: call of overloaded 'abs(unsigned int)' is ambiguous diff = std::abs(pList->m_Items[i].GetRawString().LowerCase()[j] - (int)m_InputBuffer[j]); ^ In file included from /usr/include/c++/7/cmath:47:0, from /usr/include/c++/7/math.h:36, from ../../../source/lib/posix/posix_types.h:48, from ../../../source/lib/precompiled.h:64, from ../../../source/pch/gui/precompiled.h:18: /usr/include/c++/7/bits/std_abs.h:78:3: note: candidate: constexpr long double std::abs(long double) abs(long double __x) ^~~ /usr/include/c++/7/bits/std_abs.h:74:3: note: candidate: constexpr float std::abs(float) abs(float __x) ^~~ /usr/include/c++/7/bits/std_abs.h:70:3: note: candidate: constexpr double std::abs(double) abs(double __x) ^~~ /usr/include/c++/7/bits/std_abs.h:61:3: note: candidate: long long int std::abs(long long int) abs(long long __x) { return __builtin_llabs (__x); } ^~~ /usr/include/c++/7/bits/std_abs.h:56:3: note: candidate: long int std::abs(long int) abs(long __i) { return __builtin_labs(__i); } ^~~ In file included from /usr/include/c++/7/bits/std_abs.h:38:0, from /usr/include/c++/7/cmath:47, from /usr/include/c++/7/math.h:36, from ../../../source/lib/posix/posix_types.h:48, from ../../../source/lib/precompiled.h:64, from ../../../source/pch/gui/precompiled.h:18: /usr/include/stdlib.h:735:12: note: candidate: int abs(int) extern int abs (int __x) __THROW __attribute__ ((__const__)) __wur; ^~~ gui.make:198: recipe for target 'obj/gui_Release/CDropDown.o' failed make[3]: *** [obj/gui_Release/CDropDown.o] Error 1
The root cause of this failure is that wchar_t is unsigned on armhf. Subtracting a signed 32-bit number from an unsigned one results in an unsigned result which std::abs (understandably) does not support.
Casting both arguments of the subtraction to int fixes the build failure
Author: Peter Michael Green <plugwash@debian.org>
The complete build log is available at https://buildd.debian.org/status/fetch.php?pkg=0ad&arch=armhf&ver=0.0.22-1&stamp=1508365643&raw=0
This was Debian bug #879071
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=879071