Skip to content

Commit

Permalink
Merge 'seastar.cc, tls: include used header ' from Kefu Chai
Browse files Browse the repository at this point in the history
this series add two missing `#include`:s in `tls.cc` and `seastar.cc`. for similar but different reasons:

- in `tls.cc`, we use `unordered_set<>` template without including it. this compiles fine without enabling C++20 modules, but this behavior is fragile -- we could remove the `#include <unordered_set>` macro in a random header file (indirectly) included by this source file in future. so we should include it where the template is used.
- in `seastar.cc`, the purview is supposed to include all external headers. if it fails to do so, the implementation units would fail to access a single copy of the symbols, and causes confusions of the compiler.

Closes #2175

* github.com:scylladb/seastar:
  seastar.cc: include used header
  tls: include used header of <unordered_set>
  • Loading branch information
nyh committed Apr 3, 2024
2 parents 47e2ff6 + da77409 commit b74a027
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/net/tls.cc
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ module;
#include <system_error>
#include <memory>
#include <chrono>
#include <unordered_set>

#include <netinet/in.h>
#include <sys/stat.h>
Expand Down
1 change: 1 addition & 0 deletions src/seastar.cc
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ module;
#include <typeindex>
#include <type_traits>
#include <unordered_map>
#include <unordered_set>
#include <utility>
#include <variant>
#include <vector>
Expand Down

0 comments on commit b74a027

Please sign in to comment.