]> granicus.if.org Git - pdns/commitdiff
cast usec, avoids a build failure on macOS/Darwin
authorPeter van Dijk <peter.van.dijk@powerdns.com>
Fri, 1 Mar 2019 09:05:39 +0000 (10:05 +0100)
committerPeter van Dijk <peter.van.dijk@powerdns.com>
Fri, 1 Mar 2019 09:05:39 +0000 (10:05 +0100)
pdns/dnsscope.cc

index be8b94ea708a813ed0ee96eba23551904e3e67cb..a31106e6cc1555d6c845ae0d91d755ccf83d2e1c 100644 (file)
@@ -125,7 +125,7 @@ void visitor(const StatNode* node, const StatNode::Stat& selfstat, const StatNod
 
 const struct timeval operator-(const struct pdns_timeval& lhs, const struct pdns_timeval& rhs)
 {
-  struct timeval a{lhs.tv_sec, lhs.tv_usec}, b{rhs.tv_sec, rhs.tv_usec};
+  struct timeval a{lhs.tv_sec, static_cast<suseconds_t>(lhs.tv_usec)}, b{rhs.tv_sec, static_cast<suseconds_t>(rhs.tv_usec)};
   return operator-(a,b);
 }