From 8f6db0b4c19875244f11c5972f4d31c26e58625a Mon Sep 17 00:00:00 2001 From: Fredrik Fornwall Date: Sat, 1 Jul 2017 00:32:45 +0200 Subject: [PATCH] apt: Fix building with unified headers --- packages/apt/apt-private-private-download.cc.patch | 11 +++++++++++ packages/apt/cmndline-no-strchrnul.patch | 4 ++-- packages/apt/debsrcrecords.patch | 4 ++-- 3 files changed, 15 insertions(+), 4 deletions(-) create mode 100644 packages/apt/apt-private-private-download.cc.patch diff --git a/packages/apt/apt-private-private-download.cc.patch b/packages/apt/apt-private-private-download.cc.patch new file mode 100644 index 000000000..55e3d464b --- /dev/null +++ b/packages/apt/apt-private-private-download.cc.patch @@ -0,0 +1,11 @@ +diff -u -r ../apt-1.2.12/apt-private/private-download.cc ./apt-private/private-download.cc +--- ../apt-1.2.12/apt-private/private-download.cc 2016-05-11 10:57:51.000000000 +0200 ++++ ./apt-private/private-download.cc 2017-07-01 00:31:32.131776100 +0200 +@@ -121,7 +121,6 @@ + /*}}}*/ + bool CheckFreeSpaceBeforeDownload(std::string const &Dir, unsigned long long FetchBytes)/*{{{*/ + { +- uint32_t const RAMFS_MAGIC = 0x858458f6; + /* Check for enough free space, but only if we are actually going to + download */ + if (_config->FindB("APT::Get::Print-URIs", false) == true || diff --git a/packages/apt/cmndline-no-strchrnul.patch b/packages/apt/cmndline-no-strchrnul.patch index 61b0479b1..55a08727f 100644 --- a/packages/apt/cmndline-no-strchrnul.patch +++ b/packages/apt/cmndline-no-strchrnul.patch @@ -8,8 +8,8 @@ diff -u -r ../apt-0.9.16.1/apt-pkg/contrib/cmndline.cc ./apt-pkg/contrib/cmndlin +#if defined(__ANDROID__) +static char* strchrnul(char const* s, int c) +{ -+ char* result = strchr(s, c); -+ return (result == NULL) ? const_cast(s + strlen(s)) : result; ++ char const* result = strchr(s, c); ++ return const_cast((result == NULL) ? (s + strlen(s)) : result); +} +#endif + diff --git a/packages/apt/debsrcrecords.patch b/packages/apt/debsrcrecords.patch index bf34220b2..bedcbc096 100644 --- a/packages/apt/debsrcrecords.patch +++ b/packages/apt/debsrcrecords.patch @@ -8,8 +8,8 @@ diff -u -r ../apt-0.9.16.1/apt-pkg/deb/debsrcrecords.cc ./apt-pkg/deb/debsrcreco +#if defined(__ANDROID__) +static char* strchrnul(char const* s, int c) +{ -+ char* result = strchr(s, c); -+ return (result == NULL) ? const_cast(s + strlen(s)) : result; ++ char const* result = strchr(s, c); ++ return const_cast((result == NULL) ? (s + strlen(s)) : result); +} +#endif +