Beim kompilieren des vdr-2.20 auf dem Fedora Buildserver kommt diese Fehlermeldung:
g++ -O3 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic -fPIC -Werror=overloaded-virtual -Wno-parentheses -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -fPIC -c -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -DREMOTE_KBD -DVDR_USER="vdr" -DSDNOTIFY -DLIRC_DEVICE="/var/run/lirc/lircd" -DVIDEODIR="/var/lib/vdr/video" -DCONFDIR="/etc/vdr" -DARGSDIR="/etc/vdr/conf.d" -DCACHEDIR="/var/cache/vdr" -DRESDIR="/usr/share/vdr" -DPLUGINDIR="/usr/lib64/vdr" -DLOCDIR="/usr/share/locale" -I/usr/include/freetype2 -I/usr/include/libpng16 -o dvbdevice.o dvbdevice.c
dvbdevice.c: In member function 'bool cDvbTuner::SetFrontend()':
dvbdevice.c:851:31: error: call of overloaded 'abs(unsigned int&)' is ambiguous
frequency = abs(frequency); // Allow for C-band, where the frequency is less than the LOF
^
komplette Logdatei:
MIt folgendem Patch lässt sich der vdr-2.2.0 wieder kompilieren.
--- a/dvbdevice.c.orig 2017-02-15 15:46:26.642238239 +0100
+++ b/dvbdevice.c 2017-02-15 15:46:51.820575674 +0100
@@ -848,7 +848,7 @@
CHECK(ioctl(fd_frontend, FE_SET_VOLTAGE, volt));
CHECK(ioctl(fd_frontend, FE_SET_TONE, tone));
}
- frequency = abs(frequency); // Allow for C-band, where the frequency is less than the LOF
+ frequency = abs(int(frequency)); // Allow for C-band, where the frequency is less than the LOF
// DVB-S/DVB-S2 (common parts)
SETCMD(DTV_FREQUENCY, frequency * 1000UL);
Display More
Porting to GCC 7
Kann sich jemand das mal anschauen, ob das programmiertechnisch ok ist ?