Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit adabcf99 authored by Android Build Coastguard Worker's avatar Android Build Coastguard Worker
Browse files

Snap for 10605052 from e6344c1d to mainline-tethering-release

Change-Id: I883d1b51cf14faaaa43e9f9b6d19e62a477af27e
parents ddae0364 e6344c1d
Loading
Loading
Loading
Loading
+4 −6
Original line number Diff line number Diff line
@@ -229,7 +229,6 @@ cc_library {
        "libmodules-utils-build",
        "libprotobuf-cpp-lite",
        "libstatslog_resolv",
        "libstatspush_compat",
        "libsysutils",
        "netd_event_listener_interface-lateststable-ndk",
        "server_configurable_flags",
@@ -292,7 +291,7 @@ genrule {
    name: "statslog_resolv.h",
    tools: ["stats-log-api-gen"],
    cmd: "$(location stats-log-api-gen) --header $(genDir)/statslog_resolv.h --module resolv" +
        " --namespace android,net,stats --minApiLevel 29",
        " --namespace android,net,stats --minApiLevel 30",
    out: [
        "statslog_resolv.h",
    ],
@@ -302,7 +301,7 @@ genrule {
    name: "statslog_resolv.cpp",
    tools: ["stats-log-api-gen"],
    cmd: "$(location stats-log-api-gen) --cpp $(genDir)/statslog_resolv.cpp --module resolv" +
        " --namespace android,net,stats --importHeader statslog_resolv.h --minApiLevel 29",
        " --namespace android,net,stats --importHeader statslog_resolv.h --minApiLevel 30",
    out: [
        "statslog_resolv.cpp",
    ],
@@ -316,10 +315,9 @@ cc_library_static {
    export_generated_headers: ["statslog_resolv.h"],
    static_libs: [
        "libcutils",
        "libstatspush_compat",
    ],
    header_libs: [
        "libgtest_prod_headers", // Used by libstatspush_compat
    shared_libs: [
        "libstatssocket",
    ],
    apex_available: ["com.android.resolv"],
    min_sdk_version: "30",
+1 −0
Original line number Diff line number Diff line
@@ -20,6 +20,7 @@
#include <netinet/in.h>
#include <condition_variable>
#include <cstdlib>
#include <functional>
#include <mutex>
#include <unordered_map>

+1 −0
Original line number Diff line number Diff line
@@ -17,6 +17,7 @@
#pragma once

#include <climits>
#include <functional>
#include <map>
#include <mutex>
#include <string>
+1 −1
Original line number Diff line number Diff line
set noparent
file:platform/packages/modules/Connectivity:master:/OWNERS_core_networking
file:platform/packages/modules/Connectivity:main:/OWNERS_core_networking
+6 −10
Original line number Diff line number Diff line
@@ -57,8 +57,7 @@ impl BootTime {
    /// Gets a `BootTime` representing the current moment in time.
    pub fn now() -> BootTime {
        let mut t = libc::timespec { tv_sec: 0, tv_nsec: 0 };
        // # Safety
        // clock_gettime's only action will be to possibly write to the pointer provided,
        // SAFETY: clock_gettime's only action will be to possibly write to the pointer provided,
        // and no borrows exist from that object other than the &mut used to construct the pointer
        // itself.
        if unsafe { libc::clock_gettime(libc::CLOCK_BOOTTIME, &mut t as *mut libc::timespec) } != 0
@@ -93,9 +92,8 @@ struct TimerFd(RawFd);

impl Drop for TimerFd {
    fn drop(&mut self) {
        // # Safety
        // The fd is owned by the TimerFd struct, and no memory access occurs as a result of this
        // call.
        // SAFETY: The fd is owned by the TimerFd struct, and no memory access occurs as a result of
        // this call.
        unsafe {
            libc::close(self.0);
        }
@@ -110,9 +108,8 @@ impl AsRawFd for TimerFd {

impl TimerFd {
    fn create() -> io::Result<Self> {
        // # Unsafe
        // This libc call will either give us back a file descriptor or fail, it does not act on
        // memory or resources.
        // SAFETY: This libc call will either give us back a file descriptor or fail, it does not
        // act on memory or resources.
        let raw = unsafe {
            libc::timerfd_create(libc::CLOCK_BOOTTIME, libc::TFD_NONBLOCK | libc::TFD_CLOEXEC)
        };
@@ -131,8 +128,7 @@ impl TimerFd {
                tv_nsec: duration.subsec_nanos().try_into().unwrap(),
            },
        };
        // # Unsafe
        // We own `timer` and there are no borrows to it other than the pointer we pass to
        // SAFETY: We own `timer` and there are no borrows to it other than the pointer we pass to
        // timerfd_settime. timerfd_settime is explicitly documented to handle a null output
        // parameter for its fourth argument by not filling out the output. The fd passed in at
        // self.0 is owned by the `TimerFd` struct, so we aren't breaking anyone else's invariants.
Loading