Bug 208468

Summary: multimedia/vdr: Fix build with libc++ 3.8.0
Product: Ports & Packages Reporter: Dimitry Andric <dim>
Component: Individual Port(s)Assignee: Thomas Zander <riggs>
Status: Closed FIXED    
Severity: Affects Some People CC: riggs
Priority: --- Keywords: easy, needs-qa, patch
Version: Latest   
Hardware: Any   
OS: Any   
Bug Depends on:    
Bug Blocks: 208158    
Attachments:
Description Flags
Fix type for abs() calls in multimedia/vdr none

Description Dimitry Andric freebsd_committer freebsd_triage 2016-04-02 17:14:35 UTC
Created attachment 168902 [details]
Fix type for abs() calls in multimedia/vdr

During the exp-run in bug 208158, it was found that multimedia/vdr gives errors with libc++ 3.8.0 [1]:

dvbdevice.c:769:18: error: call to 'abs' is ambiguous
     frequency = abs(frequency); // Allow for C-band, where the frequency is less than the LOF
                 ^~~

This is because 'frequency' is unsigned, and it is therefore ambiguous to which type it should be casted before calling abs().  Two similar ambiguities exist in remux.c.  Fix these by explicity casting the arguments to int.

[1] http://package18.nyi.freebsd.org/data/headamd64PR208158-default/2016-03-22_18h30m05s/logs/errors/vdr-1.7.29_6.log
Comment 1 commit-hook freebsd_committer freebsd_triage 2016-04-09 10:15:19 UTC
A commit references this bug:

Author: riggs
Date: Sat Apr  9 10:14:50 UTC 2016
New revision: 412803
URL: https://svnweb.freebsd.org/changeset/ports/412803

Log:
  Fix build with libc++ 3.8.0

  PR:		208468
  Submitted by:	dim
  MFH:		2016Q2 (build fix blanket)

Changes:
  head/multimedia/vdr/files/patch-abs-types.diff
Comment 2 commit-hook freebsd_committer freebsd_triage 2016-04-09 10:23:22 UTC
A commit references this bug:

Author: riggs
Date: Sat Apr  9 10:22:23 UTC 2016
New revision: 412804
URL: https://svnweb.freebsd.org/changeset/ports/412804

Log:
  MFH: r412803

  Fix build with libc++ 3.8.0

  PR:		208468
  Submitted by:	dim

  Approved by:	ports-secteam (build fix blanket)

Changes:
_U  branches/2016Q2/
  branches/2016Q2/multimedia/vdr/files/patch-abs-types.diff