]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Fix building with GCC 15.1: missing `cstdint` include 15520/head
authorRemi Gacogne <remi.gacogne@powerdns.com>
Mon, 5 May 2025 08:42:20 +0000 (10:42 +0200)
committerRemi Gacogne <remi.gacogne@powerdns.com>
Mon, 5 May 2025 08:42:20 +0000 (10:42 +0200)
GCC 15.1 complains about a missing `cstdint` include when building
`DNSdist`:
```
In file included from ../doh3.hh:29,
                 from ../doh3.cc:23:
../noinitvector.hh:67:35: error: ‘uint8_t’ was not declared in this scope
   67 | using PacketBuffer = NoInitVector<uint8_t>;
      |                                   ^~~~~~~
../noinitvector.hh:7:1: note: ‘uint8_t’ is defined in header ‘<cstdint>’; this is probably fixable by adding ‘#include <cstdint>’
    6 | #include <vector>
  +++ |+#include <cstdint>
    7 |
../noinitvector.hh:67:42: error: template argument 1 is invalid
   67 | using PacketBuffer = NoInitVector<uint8_t>;
      |                                          ^
In file included from ../dnsdist-idstate.hh:27,
                 from ../doh3.hh:48:
../dnscrypt.hh:247:20: error: ‘PacketBuffer’ has not been declared
  247 |   void parsePacket(PacketBuffer& packet, bool tcp, time_t now);
      |                    ^~~~~~~~~~~~
../dnscrypt.hh:248:31: error: ‘PacketBuffer’ has not been declared
  248 |   void getDecrypted(bool tcp, PacketBuffer& packet);
      |                               ^~~~~~~~~~~~
../dnscrypt.hh:249:43: error: ‘PacketBuffer’ has not been declared
  249 |   void getCertificateResponse(time_t now, PacketBuffer& response) const;
      |                                           ^~~~~~~~~~~~
../dnscrypt.hh:250:23: err
```

pdns/noinitvector.hh

index cc7efc30e0af2bd4aab5a696ebc628299e126fc6..741e76e630fe377aa7ba4651300ba41582e6ecf1 100644 (file)
@@ -1,5 +1,6 @@
 #pragma once
 
+#include <cstdint>
 #include <memory>
 #include <new>
 #include <utility>