]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Fix missing definition UINT16_MAX under GCC 4.7. 3473/head
authorAndrew Nelless <andrew@nelless.net>
Sun, 28 Feb 2016 01:28:02 +0000 (01:28 +0000)
committerAndrew Nelless <andrew@nelless.net>
Sun, 28 Feb 2016 01:35:36 +0000 (01:35 +0000)
std::numeric_limits is used elsewhere, so I went with that.

pdns/pdns_recursor.cc

index cfc150cf86d4532d56115a8bb67bc4f484d3a5f5..4f6f021aba8366c14267d820c7da006375006936 100644 (file)
@@ -1028,7 +1028,7 @@ void handleRunningTCPQuestion(int fd, FDMultiplexer::funcparam_t& var)
   }
   else if(conn->state==TCPConnection::GETQUESTION) {
     ssize_t bytes=recv(conn->getFD(), conn->data + conn->bytesread, conn->qlen - conn->bytesread, 0);
-    if(!bytes || bytes < 0 || bytes > UINT16_MAX) {
+    if(!bytes || bytes < 0 || bytes > std::numeric_limits<std::uint16_t>::max()) {
       L<<Logger::Error<<"TCP client "<< conn->d_remote.toString() <<" disconnected while reading question body"<<endl;
       t_fdm->removeReadFD(fd);
       return;