Browse Source

apt: Fix building with unified headers

android-5
Fredrik Fornwall 8 years ago
parent
commit
8f6db0b4c1
  1. 11
      packages/apt/apt-private-private-download.cc.patch
  2. 4
      packages/apt/cmndline-no-strchrnul.patch
  3. 4
      packages/apt/debsrcrecords.patch

11
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 ||

4
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<char*>(s + strlen(s)) : result;
+ char const* result = strchr(s, c);
+ return const_cast<char*>((result == NULL) ? (s + strlen(s)) : result);
+}
+#endif
+

4
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<char*>(s + strlen(s)) : result;
+ char const* result = strchr(s, c);
+ return const_cast<char*>((result == NULL) ? (s + strlen(s)) : result);
+}
+#endif
+

Loading…
Cancel
Save