Skip to content

Commit

Permalink
Bug 1924098 - Vendor libwebrtc from 1bd331f102
Browse files Browse the repository at this point in the history
Upstream commit: https://webrtc.googlesource.com/src/+/1bd331f102377969e708e47f9fa8dc3cb90fe599
    Ensure <netinet/in.h> is included by using rtc_base/ip_address.h.

    Change-Id: I1b48275ef458bcd579d027b879240c702975ab56
    Bug: b/236227627
    Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/362280
    Reviewed-by: Harald Alvestrand <[email protected]>
    Commit-Queue: Jeremy Leconte <[email protected]>
    Cr-Commit-Position: refs/heads/main@{#43001}
  • Loading branch information
mfromanmoz committed Oct 15, 2024
1 parent 370767d commit fcc9a7a
Show file tree
Hide file tree
Showing 26 changed files with 81 additions and 83 deletions.
3 changes: 3 additions & 0 deletions third_party/libwebrtc/README.moz-ff-commit
Original file line number Diff line number Diff line change
Expand Up @@ -32790,3 +32790,6 @@ e184c56bef
# MOZ_LIBWEBRTC_SRC=/home/mfroman/mozilla/elm/.moz-fast-forward/moz-libwebrtc MOZ_LIBWEBRTC_BRANCH=mozpatches bash dom/media/webrtc/third_party_build/fast-forward-libwebrtc.sh
# base of lastest vendoring
47d48a2089
# MOZ_LIBWEBRTC_SRC=/home/mfroman/mozilla/elm/.moz-fast-forward/moz-libwebrtc MOZ_LIBWEBRTC_BRANCH=mozpatches bash dom/media/webrtc/third_party_build/fast-forward-libwebrtc.sh
# base of lastest vendoring
1bd331f102
2 changes: 2 additions & 0 deletions third_party/libwebrtc/README.mozilla
Original file line number Diff line number Diff line change
Expand Up @@ -21884,3 +21884,5 @@ libwebrtc updated from /home/mfroman/mozilla/elm/.moz-fast-forward/moz-libwebrtc
libwebrtc updated from /home/mfroman/mozilla/elm/.moz-fast-forward/moz-libwebrtc commit mozpatches on 2024-10-15T23:49:00.606626.
# ./mach python dom/media/webrtc/third_party_build/vendor-libwebrtc.py --from-local /home/mfroman/mozilla/elm/.moz-fast-forward/moz-libwebrtc --commit mozpatches libwebrtc
libwebrtc updated from /home/mfroman/mozilla/elm/.moz-fast-forward/moz-libwebrtc commit mozpatches on 2024-10-15T23:49:54.669234.
# ./mach python dom/media/webrtc/third_party_build/vendor-libwebrtc.py --from-local /home/mfroman/mozilla/elm/.moz-fast-forward/moz-libwebrtc --commit mozpatches libwebrtc
libwebrtc updated from /home/mfroman/mozilla/elm/.moz-fast-forward/moz-libwebrtc commit mozpatches on 2024-10-15T23:50:51.433136.
3 changes: 0 additions & 3 deletions third_party/libwebrtc/api/transport/stun.cc
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,6 @@

#include "api/transport/stun.h"

#if defined(WEBRTC_POSIX)
#include <netinet/in.h>
#endif
#include <string.h>

#include <algorithm> // IWYU pragma: keep
Expand Down
3 changes: 0 additions & 3 deletions third_party/libwebrtc/api/transport/stun_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,6 @@

#include "api/transport/stun.h"

#if defined(WEBRTC_POSIX)
#include <netinet/in.h>
#endif
#include <string.h>

#include <cstdint>
Expand Down
1 change: 1 addition & 0 deletions third_party/libwebrtc/examples/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -792,6 +792,7 @@ if (is_linux || is_chromeos || is_win) {
]
deps = [
"../rtc_base:checks",
"../rtc_base:ip_address",
"../rtc_base:net_helpers",
"../rtc_base:stringutils",
"../system_wrappers:field_trial",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@

#include <string>

#include "rtc_base/ip_address.h"
#include "rtc_base/net_helpers.h"

#ifdef WIN32
typedef int socklen_t;
typedef SOCKET NativeSocket;
#else
#include <netinet/in.h>
#include <sys/select.h>
#define closesocket close
typedef int NativeSocket;
Expand Down
5 changes: 4 additions & 1 deletion third_party/libwebrtc/modules/audio_coding/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -823,6 +823,7 @@ rtc_library("neteq_test_tools") {
"../../common_audio",
"../../rtc_base:buffer",
"../../rtc_base:checks",
"../../rtc_base:copy_on_write_buffer",
"../../rtc_base:digest",
"../../rtc_base:stringutils",
"../../rtc_base/system:arch",
Expand Down Expand Up @@ -1380,6 +1381,7 @@ if (rtc_include_tests) {

deps = [
":audio_coding",
":audio_coding_module_typedefs",
":audio_encoder_cng",
":neteq_input_audio_tools",
"../../api/audio:audio_frame_api",
Expand All @@ -1389,10 +1391,11 @@ if (rtc_include_tests) {
"../../api/audio_codecs/ilbc:audio_encoder_ilbc",
"../../api/audio_codecs/opus:audio_encoder_opus",
"../../api/environment:environment_factory",
"../../rtc_base:checks",
"../../rtc_base:ip_address",
"../../rtc_base:safe_conversions",
"//third_party/abseil-cpp/absl/flags:flag",
"//third_party/abseil-cpp/absl/flags:parse",
"//third_party/abseil-cpp/absl/memory",
]

deps += audio_coding_deps
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,20 @@

#include <stdio.h>

#include <cstdint>
#include <memory>
#include <utility>

#ifdef WIN32
#include <winsock2.h>
#endif
#if defined(WEBRTC_LINUX) || defined(WEBRTC_FUCHSIA)
#include <netinet/in.h>
#endif

#include <iostream>
#include <map>
#include <string>
#include <vector>

#include "absl/flags/flag.h"
#include "absl/flags/parse.h"
#include "absl/memory/memory.h"
#include "api/audio/audio_frame.h"
#include "api/audio_codecs/L16/audio_encoder_L16.h"
#include "api/audio_codecs/g711/audio_encoder_g711.h"
Expand All @@ -34,7 +33,10 @@
#include "api/environment/environment_factory.h"
#include "modules/audio_coding/codecs/cng/audio_encoder_cng.h"
#include "modules/audio_coding/include/audio_coding_module.h"
#include "modules/audio_coding/include/audio_coding_module_typedefs.h"
#include "modules/audio_coding/neteq/tools/input_audio_file.h"
#include "rtc_base/checks.h"
#include "rtc_base/ip_address.h"
#include "rtc_base/numerics/safe_conversions.h"

ABSL_FLAG(bool, list_codecs, false, "Enumerate all codecs");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,16 @@

#include <string.h>

#include "absl/strings/string_view.h"
#ifndef WIN32
#include <netinet/in.h>
#endif

#include <cstdint>
#include <memory>
#include <optional>

#include "absl/strings/string_view.h"
#include "modules/audio_coding/neteq/tools/packet.h"
#include "modules/audio_coding/neteq/tools/packet_source.h"
#include "modules/rtp_rtcp/include/rtp_rtcp_defines.h"
#include "rtc_base/checks.h"
#include "rtc_base/copy_on_write_buffer.h"
#include "test/rtp_file_reader.h"

namespace webrtc {
Expand Down
2 changes: 1 addition & 1 deletion third_party/libwebrtc/moz-patch-stack/0001.patch
Original file line number Diff line number Diff line change
Expand Up @@ -1543,7 +1543,7 @@ index f08d452346..b4342125a7 100644
const bool enable_svc_for_simulcast_;
std::optional<SimulcastToSvcConverter> simulcast_to_svc_converter_;
diff --git a/rtc_base/BUILD.gn b/rtc_base/BUILD.gn
index 28f831b7d0..d6b211dac6 100644
index e1282d7293..ef2a93fbb8 100644
--- a/rtc_base/BUILD.gn
+++ b/rtc_base/BUILD.gn
@@ -444,6 +444,12 @@ rtc_library("logging") {
Expand Down
2 changes: 1 addition & 1 deletion third_party/libwebrtc/moz-patch-stack/0012.patch
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ index a2ea218a8b..23a8f4f3f3 100644
#include <new>
#include <string>
diff --git a/rtc_base/byte_order.h b/rtc_base/byte_order.h
index b8f8ae9f7a..382511daeb 100644
index ed7c75996f..be49d1b9e1 100644
--- a/rtc_base/byte_order.h
+++ b/rtc_base/byte_order.h
@@ -90,6 +90,8 @@
Expand Down
34 changes: 17 additions & 17 deletions third_party/libwebrtc/moz-patch-stack/0030.patch
Original file line number Diff line number Diff line change
Expand Up @@ -756,7 +756,7 @@ index 1c08382969..ff69ea62dc 100644
using webrtc::FrameDecryptorInterface;
using webrtc::FrameEncryptorInterface;
diff --git a/modules/audio_coding/BUILD.gn b/modules/audio_coding/BUILD.gn
index 087043bc30..fd98caa5c9 100644
index c92a26fd0d..6fe5ff6a44 100644
--- a/modules/audio_coding/BUILD.gn
+++ b/modules/audio_coding/BUILD.gn
@@ -540,7 +540,7 @@ rtc_library("webrtc_opus_wrapper") {
Expand Down Expand Up @@ -1046,7 +1046,7 @@ index 29a7bea9d9..a8994aaa68 100644
"/config/external/nspr",
"/nsprpub/lib/ds",
diff --git a/rtc_base/BUILD.gn b/rtc_base/BUILD.gn
index d6b211dac6..ee4bcf3edb 100644
index ef2a93fbb8..ec03bc2680 100644
--- a/rtc_base/BUILD.gn
+++ b/rtc_base/BUILD.gn
@@ -316,6 +316,7 @@ rtc_library("sample_counter") {
Expand Down Expand Up @@ -1075,15 +1075,15 @@ index d6b211dac6..ee4bcf3edb 100644
if (rtc_build_json) {
deps += [ "//third_party/jsoncpp" ]
} else {
@@ -1185,6 +1189,7 @@ if (!build_with_chromium) {
@@ -1186,6 +1190,7 @@ if (!build_with_chromium) {
}

rtc_library("network") {
+if (!build_with_mozilla) {
visibility = [ "*" ]
sources = [
"network.cc",
@@ -1222,16 +1227,20 @@ rtc_library("network") {
@@ -1223,16 +1228,20 @@ rtc_library("network") {
deps += [ ":win32" ]
}
}
Expand All @@ -1104,7 +1104,7 @@ index d6b211dac6..ee4bcf3edb 100644
visibility = [ "*" ]
sources = [
"net_helper.cc",
@@ -1242,8 +1251,10 @@ rtc_library("net_helper") {
@@ -1243,8 +1252,10 @@ rtc_library("net_helper") {
"//third_party/abseil-cpp/absl/strings:string_view",
]
}
Expand All @@ -1115,23 +1115,23 @@ index d6b211dac6..ee4bcf3edb 100644
visibility = [ "*" ]
sources = [
"socket_adapters.cc",
@@ -1262,6 +1273,7 @@ rtc_library("socket_adapters") {
@@ -1263,6 +1274,7 @@ rtc_library("socket_adapters") {
"//third_party/abseil-cpp/absl/strings:string_view",
]
}
+}

rtc_library("network_route") {
sources = [
@@ -1276,6 +1288,7 @@ rtc_library("network_route") {
@@ -1277,6 +1289,7 @@ rtc_library("network_route") {
}

rtc_library("async_tcp_socket") {
+if (!build_with_mozilla) {
sources = [
"async_tcp_socket.cc",
"async_tcp_socket.h",
@@ -1293,8 +1306,10 @@ rtc_library("async_tcp_socket") {
@@ -1294,8 +1307,10 @@ rtc_library("async_tcp_socket") {
"network:sent_packet",
]
}
Expand All @@ -1142,7 +1142,7 @@ index d6b211dac6..ee4bcf3edb 100644
visibility = [ "*" ]
sources = [
"async_udp_socket.cc",
@@ -1317,8 +1332,10 @@ rtc_library("async_udp_socket") {
@@ -1318,8 +1333,10 @@ rtc_library("async_udp_socket") {
"system:no_unique_address",
]
}
Expand All @@ -1153,63 +1153,63 @@ index d6b211dac6..ee4bcf3edb 100644
visibility = [ "*" ]
sources = [
"async_packet_socket.cc",
@@ -1338,6 +1355,7 @@ rtc_library("async_packet_socket") {
@@ -1339,6 +1356,7 @@ rtc_library("async_packet_socket") {
"third_party/sigslot",
]
}
+}

if (rtc_include_tests) {
rtc_library("async_packet_socket_unittest") {
@@ -1392,6 +1410,7 @@ rtc_library("data_rate_limiter") {
@@ -1393,6 +1411,7 @@ rtc_library("data_rate_limiter") {
}

rtc_library("unique_id_generator") {
+if (!build_with_mozilla) {
sources = [
"unique_id_generator.cc",
"unique_id_generator.h",
@@ -1406,6 +1425,7 @@ rtc_library("unique_id_generator") {
@@ -1407,6 +1426,7 @@ rtc_library("unique_id_generator") {
"//third_party/abseil-cpp/absl/strings:string_view",
]
}
+}

rtc_library("crc32") {
sources = [
@@ -1439,6 +1459,7 @@ rtc_library("stream") {
@@ -1440,6 +1460,7 @@ rtc_library("stream") {
}

rtc_library("rtc_certificate_generator") {
+if (!build_with_mozilla) {
visibility = [ "*" ]
sources = [
"rtc_certificate_generator.cc",
@@ -1453,6 +1474,7 @@ rtc_library("rtc_certificate_generator") {
@@ -1454,6 +1475,7 @@ rtc_library("rtc_certificate_generator") {
"//third_party/abseil-cpp/absl/functional:any_invocable",
]
}
+}

rtc_source_set("ssl_header") {
visibility = [ "*" ]
@@ -1509,6 +1531,7 @@ rtc_library("crypto_random") {
@@ -1510,6 +1532,7 @@ rtc_library("crypto_random") {
}

rtc_library("ssl") {
+if (!build_with_mozilla) {
visibility = [ "*" ]
sources = [
"openssl_key_pair.cc",
@@ -1582,6 +1605,7 @@ rtc_library("ssl") {
@@ -1583,6 +1606,7 @@ rtc_library("ssl") {
deps += [ ":win32" ]
}
}
+}

rtc_library("ssl_adapter") {
visibility = [ "*" ]
@@ -2190,7 +2214,7 @@ if (rtc_include_tests) {
@@ -2192,7 +2216,7 @@ if (rtc_include_tests) {
}
}

Expand Down
2 changes: 1 addition & 1 deletion third_party/libwebrtc/moz-patch-stack/0062.patch
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ index 7e6be706f8..bacc3ca87a 100644
rtc_library("task_queue_test") {
visibility = [ "*" ]
diff --git a/rtc_base/BUILD.gn b/rtc_base/BUILD.gn
index ee4bcf3edb..3ebfd71ef1 100644
index ec03bc2680..db74b5a811 100644
--- a/rtc_base/BUILD.gn
+++ b/rtc_base/BUILD.gn
@@ -696,10 +696,14 @@ if (is_mac || is_ios) {
Expand Down
2 changes: 1 addition & 1 deletion third_party/libwebrtc/moz-patch-stack/0106.patch
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Mercurial Revision: https://hg.mozilla.org/mozilla-central/rev/4e7b3c485e549e7e3
1 file changed, 6 insertions(+)

diff --git a/rtc_base/BUILD.gn b/rtc_base/BUILD.gn
index 3ebfd71ef1..bfd6294414 100644
index db74b5a811..6f8e2d1d98 100644
--- a/rtc_base/BUILD.gn
+++ b/rtc_base/BUILD.gn
@@ -999,6 +999,12 @@ rtc_library("threading") {
Expand Down
6 changes: 3 additions & 3 deletions third_party/libwebrtc/moz-patch-stack/0109.patch
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,18 @@ Mercurial Revision: https://hg.mozilla.org/mozilla-central/rev/ee2f06666bcc6d22c
1 file changed, 2 insertions(+)

diff --git a/rtc_base/BUILD.gn b/rtc_base/BUILD.gn
index bfd6294414..e3b5697e08 100644
index 6f8e2d1d98..c659427577 100644
--- a/rtc_base/BUILD.gn
+++ b/rtc_base/BUILD.gn
@@ -1618,6 +1618,7 @@ if (!build_with_mozilla) {
@@ -1619,6 +1619,7 @@ if (!build_with_mozilla) {
}

rtc_library("ssl_adapter") {
+if (!build_with_mozilla) {
visibility = [ "*" ]
sources = [
"openssl_adapter.cc",
@@ -1667,6 +1668,7 @@ rtc_library("ssl_adapter") {
@@ -1668,6 +1669,7 @@ rtc_library("ssl_adapter") {
configs += [ "..:external_ssl_library" ]
}
}
Expand Down
2 changes: 1 addition & 1 deletion third_party/libwebrtc/moz-patch-stack/0127.patch
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Mercurial Revision: https://hg.mozilla.org/mozilla-central/rev/bbec1b95ddb5e0096
5 files changed, 26 insertions(+), 6 deletions(-)

diff --git a/modules/audio_coding/BUILD.gn b/modules/audio_coding/BUILD.gn
index fd98caa5c9..7e76cd5f21 100644
index 6fe5ff6a44..ab4854f8e3 100644
--- a/modules/audio_coding/BUILD.gn
+++ b/modules/audio_coding/BUILD.gn
@@ -540,7 +540,7 @@ rtc_library("webrtc_opus_wrapper") {
Expand Down
4 changes: 2 additions & 2 deletions third_party/libwebrtc/moz-patch-stack/0131.patch
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,7 @@ index a0ddf777db..cf15513e18 100644
}
}
diff --git a/examples/BUILD.gn b/examples/BUILD.gn
index 91c2f8ab51..68d57fa1c5 100644
index a0dbdcc154..46492a4b2b 100644
--- a/examples/BUILD.gn
+++ b/examples/BUILD.gn
@@ -9,15 +9,15 @@
Expand Down Expand Up @@ -675,7 +675,7 @@ index 9a7a783b62..3d669ceb73 100644

if (rtc_build_libsrtp) {
diff --git a/rtc_base/BUILD.gn b/rtc_base/BUILD.gn
index e3b5697e08..050ae9eae4 100644
index c659427577..ab656fc85c 100644
--- a/rtc_base/BUILD.gn
+++ b/rtc_base/BUILD.gn
@@ -9,8 +9,8 @@
Expand Down
2 changes: 2 additions & 0 deletions third_party/libwebrtc/rtc_base/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -1083,6 +1083,7 @@ rtc_library("socket") {
deps = [
":buffer",
":checks",
":ip_address",
":macromagic",
":net_helpers",
":socket_address",
Expand Down Expand Up @@ -1978,6 +1979,7 @@ if (rtc_include_tests) {
":macromagic",
":mod_ops",
":moving_max_counter",
":net_helpers",
":null_socket_server",
":one_time_event",
":platform_thread",
Expand Down
Loading

0 comments on commit fcc9a7a

Please sign in to comment.