]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Fix compilation on OpenBSD where stdin is a define 8672/head
authorOtto Moerbeek <otto.moerbeek@open-xchange.com>
Tue, 7 Jan 2020 09:24:18 +0000 (10:24 +0100)
committerOtto Moerbeek <otto.moerbeek@open-xchange.com>
Tue, 7 Jan 2020 09:24:18 +0000 (10:24 +0100)
pdns/sdig.cc

index 5ebf9ef7d34738bb4c42b5b9d8873e06eaea572c..55d516253f8512e4f0ad626f445f632259c1c65a 100644 (file)
@@ -190,7 +190,7 @@ try {
   bool showflags = false;
   bool hidesoadetails = false;
   bool doh = false;
-  bool stdin = false;
+  bool fromstdin = false;
   boost::optional<Netmask> 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<char> begin(std::cin), end;
     reply = string(begin, end);
     printReply(reply, showflags, hidesoadetails);