Add some RTC_EXPORT needed by Chromium.
These are needed by crrev.com/c/4165083.
Bug: chromium:1369096, webrtc:14131
Change-Id: Id0a46254b46cf866f2f3b7b07b97dc55066c047f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/291117
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39165}
diff --git a/p2p/base/basic_packet_socket_factory.h b/p2p/base/basic_packet_socket_factory.h
index f4282e1..396a8ba 100644
--- a/p2p/base/basic_packet_socket_factory.h
+++ b/p2p/base/basic_packet_socket_factory.h
@@ -23,12 +23,13 @@
#include "rtc_base/socket.h"
#include "rtc_base/socket_address.h"
#include "rtc_base/socket_factory.h"
+#include "rtc_base/system/rtc_export.h"
namespace rtc {
class SocketFactory;
-class BasicPacketSocketFactory : public PacketSocketFactory {
+class RTC_EXPORT BasicPacketSocketFactory : public PacketSocketFactory {
public:
explicit BasicPacketSocketFactory(SocketFactory* socket_factory);
~BasicPacketSocketFactory() override;
diff --git a/p2p/base/connection.h b/p2p/base/connection.h
index c0a19b5..4e6c7d9 100644
--- a/p2p/base/connection.h
+++ b/p2p/base/connection.h
@@ -29,6 +29,7 @@
#include "rtc_base/network.h"
#include "rtc_base/numerics/event_based_exponential_moving_average.h"
#include "rtc_base/rate_tracker.h"
+#include "rtc_base/system/rtc_export.h"
#include "rtc_base/weak_ptr.h"
namespace cricket {
@@ -56,7 +57,7 @@
// Represents a communication link between a port on the local client and a
// port on the remote client.
-class Connection : public CandidatePairInterface {
+class RTC_EXPORT Connection : public CandidatePairInterface {
public:
struct SentPing {
SentPing(absl::string_view id, int64_t sent_time, uint32_t nomination)
diff --git a/p2p/base/p2p_constants.h b/p2p/base/p2p_constants.h
index 07257d5..d51ee17 100644
--- a/p2p/base/p2p_constants.h
+++ b/p2p/base/p2p_constants.h
@@ -40,7 +40,7 @@
RTC_EXPORT extern const int ICE_CANDIDATE_COMPONENT_RTP;
RTC_EXPORT extern const int ICE_CANDIDATE_COMPONENT_RTCP;
-extern const int ICE_CANDIDATE_COMPONENT_DEFAULT;
+RTC_EXPORT extern const int ICE_CANDIDATE_COMPONENT_DEFAULT;
// RFC 4145, SDP setup attribute values.
extern const char CONNECTIONROLE_ACTIVE_STR[];
diff --git a/p2p/base/port.h b/p2p/base/port.h
index d746f3d..31091eb 100644
--- a/p2p/base/port.h
+++ b/p2p/base/port.h
@@ -176,7 +176,7 @@
// Represents a local communication mechanism that can be used to create
// connections to similar mechanisms of the other client. Subclasses of this
// one add support for specific mechanisms like local UDP ports.
-class Port : public PortInterface, public sigslot::has_slots<> {
+class RTC_EXPORT Port : public PortInterface, public sigslot::has_slots<> {
public:
// INIT: The state when a port is just created.
// KEEP_ALIVE_UNTIL_PRUNED: A port should not be destroyed even if no
diff --git a/p2p/base/stun_port.h b/p2p/base/stun_port.h
index 1397007..380dbec 100644
--- a/p2p/base/stun_port.h
+++ b/p2p/base/stun_port.h
@@ -22,6 +22,7 @@
#include "p2p/base/port.h"
#include "p2p/base/stun_request.h"
#include "rtc_base/async_packet_socket.h"
+#include "rtc_base/system/rtc_export.h"
namespace cricket {
@@ -31,7 +32,7 @@
static const int HIGH_COST_PORT_KEEPALIVE_LIFETIME = 2 * 60 * 1000;
// Communicates using the address on the outside of a NAT.
-class UDPPort : public Port {
+class RTC_EXPORT UDPPort : public Port {
public:
static std::unique_ptr<UDPPort> Create(
rtc::Thread* thread,
diff --git a/rtc_base/BUILD.gn b/rtc_base/BUILD.gn
index 4a9a546..7d236bc 100644
--- a/rtc_base/BUILD.gn
+++ b/rtc_base/BUILD.gn
@@ -839,7 +839,7 @@
"net_helpers.cc",
"net_helpers.h",
]
- deps = []
+ deps = [ "system:rtc_export" ]
if (is_android) {
deps += [ ":ifaddrs_android" ]
}
@@ -1389,6 +1389,7 @@
"net_helper.h",
]
absl_deps = [ "//third_party/abseil-cpp/absl/strings" ]
+ deps = [ "system:rtc_export" ]
}
rtc_library("socket_adapters") {
diff --git a/rtc_base/net_helper.h b/rtc_base/net_helper.h
index 758c0fa..2dce911 100644
--- a/rtc_base/net_helper.h
+++ b/rtc_base/net_helper.h
@@ -13,13 +13,14 @@
#include <string>
#include "absl/strings/string_view.h"
+#include "rtc_base/system/rtc_export.h"
// This header contains helper functions and constants used by different types
// of transports.
namespace cricket {
-extern const char UDP_PROTOCOL_NAME[];
-extern const char TCP_PROTOCOL_NAME[];
+RTC_EXPORT extern const char UDP_PROTOCOL_NAME[];
+RTC_EXPORT extern const char TCP_PROTOCOL_NAME[];
extern const char SSLTCP_PROTOCOL_NAME[];
extern const char TLS_PROTOCOL_NAME[];
diff --git a/rtc_base/net_helpers.h b/rtc_base/net_helpers.h
index 631c634..478cec3 100644
--- a/rtc_base/net_helpers.h
+++ b/rtc_base/net_helpers.h
@@ -20,6 +20,7 @@
#endif
#include "absl/strings/string_view.h"
+#include "rtc_base/system/rtc_export.h"
namespace rtc {
@@ -28,8 +29,8 @@
const char* inet_ntop(int af, const void* src, char* dst, socklen_t size);
int inet_pton(int af, absl::string_view src, void* dst);
-bool HasIPv4Enabled();
-bool HasIPv6Enabled();
+RTC_EXPORT bool HasIPv4Enabled();
+RTC_EXPORT bool HasIPv6Enabled();
} // namespace rtc