]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
dnsdist: Add missing `stdexcept` include in `lmdb-safe.hh` 14785/head
authorRemi Gacogne <remi.gacogne@powerdns.com>
Fri, 18 Oct 2024 14:20:37 +0000 (16:20 +0200)
committerRemi Gacogne <remi.gacogne@powerdns.com>
Fri, 18 Oct 2024 14:20:37 +0000 (16:20 +0200)
It was only included for non-dnsdist contexts, but `std::runtime_error`
is used in all contexts and gcc version 14.2.1 20240910 (at least) is
not happy about it:
```
In file included from ext/lmdb-safe/lmdb-safe.cc:2:
ext/lmdb-safe/lmdb-safe.hh: In member function ‘int MDBROTransactionImpl::get(MDB_dbi, const MDBInVal&, MDBOutVal&)’:
ext/lmdb-safe/lmdb-safe.hh:379:18: error: ‘runtime_error’ is not a member of ‘std’
  379 |       throw std::runtime_error("Attempt to use a closed RO transaction for get");
      |
```

ext/lmdb-safe/lmdb-safe.hh

index 8190f16ca70d1b2e1d6b415c5702afddbfe0c614..1fc86bdc0fef4767e1ebb74a501c35e04aa3fbe5 100644 (file)
@@ -2,6 +2,7 @@
 
 #include "config.h"
 
+#include <stdexcept>
 #include <string_view>
 #include <lmdb.h>
 #include <map>
@@ -18,7 +19,6 @@
 #include <boost/range/detail/common.hpp>
 #include <cstdint>
 #include <netinet/in.h>
-#include <stdexcept>
 #endif
 
 using std::string_view;