Bug 208725 - [PATCH] dns/powerdns: Fix build with libc++ 3.8.0
Summary: [PATCH] dns/powerdns: Fix build with libc++ 3.8.0
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: freebsd-ports-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks: 208158
  Show dependency treegraph
 
Reported: 2016-04-11 18:41 UTC by Dimitry Andric
Modified: 2016-04-27 11:06 UTC (History)
2 users (show)

See Also:
tremere: maintainer-feedback+


Attachments
Replace abs() on unsigned arguments in dns/powerdns (1.35 KB, patch)
2016-04-11 18:41 UTC, Dimitry Andric
no flags Details | Diff
Replace suggested patch with commit from upstream (714 bytes, patch)
2016-04-12 07:10 UTC, Ralf van der Enden
tremere: maintainer-approval+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dimitry Andric freebsd_committer freebsd_triage 2016-04-11 18:41:14 UTC
Created attachment 169220 [details]
Replace abs() on unsigned arguments in dns/powerdns

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

dnspacket.cc:645:6: error: call to 'abs' is ambiguous
  if(abs(trc->d_time - now) > trc->d_fudge) {
     ^~~

This is because abs() is being called with unsigned arguments.  Fix this calculating the time difference in a more portable way.

[1] http://package18.nyi.freebsd.org/data/headamd64PR208158-default/2016-03-22_18h30m05s/logs/errors/powerdns-3.4.8.log
Comment 1 Ralf van der Enden 2016-04-12 07:10:06 UTC
Created attachment 169232 [details]
Replace suggested patch with commit from upstream

Fixed upstream in this commit:
https://github.com/ahupowerdns/pdns/commit/f2d05dd430abdb4e630387275af0bd5477eef71b
Comment 2 Ralf van der Enden 2016-04-18 07:15:14 UTC
Comment on attachment 169220 [details]
Replace abs() on unsigned arguments in dns/powerdns

This one is obsolete, but I cannot tag it as such.
Comment 3 commit-hook freebsd_committer freebsd_triage 2016-04-26 18:18:41 UTC
A commit references this bug:

Author: dim
Date: Tue Apr 26 18:18:15 UTC 2016
New revision: 414065
URL: https://svnweb.freebsd.org/changeset/ports/414065

Log:
  During the exp-run in bug 208158, it was found that dns/powerdns gives
  errors with libc++ 3.8.0:

  dnspacket.cc:645:6: error: call to 'abs' is ambiguous
    if(abs(trc->d_time - now) > trc->d_fudge) {
       ^~~

  This is because abs() is being called with unsigned arguments.  Import
  upstream commit f2d05dd to fix it.

  Approved by:	tremere@cainites.net
  PR:		208725
  MFH:		2016Q2

Changes:
  head/dns/powerdns/files/patch-pdns_dnspacket.cc
Comment 4 commit-hook freebsd_committer freebsd_triage 2016-04-27 11:06:54 UTC
A commit references this bug:

Author: dim
Date: Wed Apr 27 11:06:01 UTC 2016
New revision: 414098
URL: https://svnweb.freebsd.org/changeset/ports/414098

Log:
  MFH: r414065

  During the exp-run in bug 208158, it was found that dns/powerdns gives
  errors with libc++ 3.8.0:

  dnspacket.cc:645:6: error: call to 'abs' is ambiguous
    if(abs(trc->d_time - now) > trc->d_fudge) {
       ^~~

  This is because abs() is being called with unsigned arguments.  Import
  upstream commit f2d05dd to fix it.

  Approved by:	portmgr (junovitch)
  PR:		208725

Changes:
_U  branches/2016Q2/
  branches/2016Q2/dns/powerdns/files/patch-pdns_dnspacket.cc