From 45219fe6d81324a7f5296111985de0189ecbd908 Mon Sep 17 00:00:00 2001 From: Otto Moerbeek Date: Tue, 7 Jan 2020 10:24:18 +0100 Subject: [PATCH] Fix compilation on OpenBSD where stdin is a define --- pdns/sdig.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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); -- 2.47.2