From: Andrew Nelless Date: Sun, 28 Feb 2016 01:28:02 +0000 (+0000) Subject: Fix missing definition UINT16_MAX under GCC 4.7. X-Git-Tag: rec-4.0.0-alpha2~45^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F3473%2Fhead;p=thirdparty%2Fpdns.git Fix missing definition UINT16_MAX under GCC 4.7. std::numeric_limits is used elsewhere, so I went with that. --- diff --git a/pdns/pdns_recursor.cc b/pdns/pdns_recursor.cc index cfc150cf86..4f6f021aba 100644 --- a/pdns/pdns_recursor.cc +++ b/pdns/pdns_recursor.cc @@ -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::max()) { L<d_remote.toString() <<" disconnected while reading question body"<removeReadFD(fd); return;