diff options
| author | Julian Andres Klode <jak@debian.org> | 2024-11-14 14:54:40 +0000 |
|---|---|---|
| committer | Julian Andres Klode <jak@debian.org> | 2024-11-14 14:54:40 +0000 |
| commit | 82752f6e0c65541244c2607e5dedf437701e07dc (patch) | |
| tree | 9f8a63e33e05350551919c0c6f66340820303120 /methods | |
| parent | 8f10ee850db3892bc979694864451be3a73ad1e8 (diff) | |
| parent | 36998f582e211f745799ddc2a8bc286541e56689 (diff) | |
Merge branch 'svequiv' into 'main'
Internally replace APT::StringView with std::string_view where it doesn't affect the ABI, with implementations that support both std::string_view and APT::StringView with new shims. ReportMirrorFailureToCentral: fix use-after-free
See merge request apt-team/apt!394
Diffstat (limited to 'methods')
| -rw-r--r-- | methods/http.cc | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/methods/http.cc b/methods/http.cc index 0c4d82262..4d0e60d93 100644 --- a/methods/http.cc +++ b/methods/http.cc @@ -23,7 +23,6 @@ #include <apt-pkg/fileutl.h> #include <apt-pkg/hashes.h> #include <apt-pkg/proxy.h> -#include <apt-pkg/string_view.h> #include <apt-pkg/strutl.h> #include <cerrno> @@ -977,12 +976,12 @@ void HttpMethod::SendReq(FetchItem *Itm) #ifdef HAVE_SYSTEMD if (ConfigFindB("User-Agent-Non-Interactive", false)) { - using APT::operator""_sv; + using std::literals::operator""sv; char *unit = nullptr; sd_pid_get_unit(getpid(), &unit); if (unit != nullptr && *unit != '\0' && not APT::String::Startswith(unit, "user@") // user@ _is_ interactive - && "packagekit.service"_sv != unit // packagekit likely is interactive - && "dbus.service"_sv != unit) // aptdaemon and qapt don't have systemd services + && "packagekit.service"sv != unit // packagekit likely is interactive + && "dbus.service"sv != unit) // aptdaemon and qapt don't have systemd services Req << " non-interactive"; free(unit); |
