From: Otto Moerbeek Date: Tue, 7 Jan 2020 09:24:18 +0000 (+0100) Subject: Fix compilation on OpenBSD where stdin is a define X-Git-Tag: auth-4.3.0-beta1~45^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F8672%2Fhead;p=thirdparty%2Fpdns.git Fix compilation on OpenBSD where stdin is a define --- diff --git a/pdns/sdig.cc b/pdns/sdig.cc index 5ebf9ef7d3..55d516253f 100644 --- a/pdns/sdig.cc +++ b/pdns/sdig.cc @@ -190,7 +190,7 @@ try { bool showflags = false; bool hidesoadetails = false; bool doh = false; - bool stdin = false; + bool fromstdin = false; boost::optional ednsnm; uint16_t xpfcode = 0, xpfversion = 0, xpfproto = 0; char *xpfsrc = NULL, *xpfdst = NULL; @@ -262,7 +262,7 @@ try { if (*argv[1] == 'h') { doh = true; } else if(strcmp(argv[1], "stdin") == 0) { - stdin = true; + fromstdin = true; } else { dest = ComboAddress(argv[1] + (*argv[1] == '@'), atoi(argv[2])); } @@ -300,7 +300,7 @@ try { #else throw PDNSException("please link sdig against libcurl for DoH support"); #endif - } else if (stdin) { + } else if (fromstdin) { std::istreambuf_iterator begin(std::cin), end; reply = string(begin, end); printReply(reply, showflags, hidesoadetails);