Skip to content

Commit b6d7491

Browse files
authored
Merge pull request ceph#60253 from MaxKellermann/includes
common: add missing include, reduce header dependencies Reviewed-by: Ronen Friedman <[email protected]> Reviewed-by: Radoslaw Zarzynski <[email protected]>
2 parents d4ed9e0 + df422f9 commit b6d7491

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+100
-16
lines changed

src/common/DecayCounter.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,15 @@
1616
#define CEPH_DECAYCOUNTER_H
1717

1818
#include "include/buffer.h"
19-
#include "common/Formatter.h"
2019
#include "common/StackStringStream.h"
2120
#include "common/ceph_time.h"
2221

2322
#include <cmath>
2423
#include <list>
2524
#include <sstream>
2625

26+
namespace ceph { class Formatter; }
27+
2728
/**
2829
*
2930
* TODO: normalize value based on some function of half_life,

src/common/Graylog.cc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
// vim: ts=8 sw=2 smarttab
33

44
#include "Graylog.h"
5+
6+
#include <iostream> // for std::cerr
7+
58
#include "common/Formatter.h"
69
#include "common/LogEntry.h"
710
#include "log/Entry.h"

src/common/Journald.cc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@
1414
#include <sys/un.h>
1515
#include <syslog.h>
1616
#include <unistd.h>
17+
18+
#include <iostream> // for std::cerr
19+
1720
#include <fmt/format.h>
1821
#include <fmt/ostream.h>
1922

@@ -23,7 +26,6 @@
2326
#include "log/SubsystemMap.h"
2427
#include "msg/msg_fmt.h"
2528

26-
2729
namespace ceph::logging {
2830

2931
namespace {

src/common/StackStringStream.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,9 @@
1818
#include <boost/container/small_vector.hpp>
1919

2020
#include <algorithm>
21-
#include <iostream>
2221
#include <memory>
2322
#include <ostream>
24-
#include <sstream>
23+
#include <string>
2524
#include <string_view>
2625
#include <vector>
2726

src/common/Thread.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717
#define CEPH_THREAD_H
1818

1919
#include <functional>
20+
#include <string>
2021
#include <string_view>
21-
#include <system_error>
2222
#include <thread>
2323
#include <cstring>
2424

src/common/Throttle.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
#include <atomic>
88
#include <chrono>
9-
#include <iostream>
9+
#include <iosfwd>
1010
#include <list>
1111
#include <map>
1212

src/common/admin_socket.cc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,13 @@
1212
*
1313
*/
1414
#include <poll.h>
15+
#include <signal.h>
1516
#include <sys/un.h>
17+
18+
#ifndef WIN32
19+
#include <sys/wait.h>
20+
#endif
21+
1622
#include <optional>
1723

1824
#include <stdlib.h>

src/common/buffer.cc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919

2020
#include <sys/uio.h>
2121

22+
#include <iostream>
23+
2224
#include "include/ceph_assert.h"
2325
#include "include/types.h"
2426
#include "include/buffer_raw.h"

src/common/ceph_argparse.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
#include "auth/Auth.h"
1717
#include "common/ceph_argparse.h"
1818
#include "common/config.h"
19+
#include "common/strtol.h" // for strict_strtof()
1920
#include "common/version.h"
2021
#include "include/str_list.h"
2122

src/common/ceph_argparse.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@
2929
#include "common/entity_name.h"
3030
#include "include/encoding.h"
3131

32+
class entity_addrvec_t;
33+
3234
/////////////////////// Types ///////////////////////
3335
class CephInitParameters
3436
{

0 commit comments

Comments
 (0)