preload-hacks: Some patches to make it work.
[termux-packages] / disabled-packages / apt-updated / apt-pkg-deb-debrecords.cc.patch
1 diff -u -r ../apt-1.6~alpha3/apt-pkg/deb/debrecords.cc ./apt-pkg/deb/debrecords.cc
2 --- ../apt-1.6~alpha3/apt-pkg/deb/debrecords.cc 2017-10-28 17:57:05.000000000 +0200
3 +++ ./apt-pkg/deb/debrecords.cc 2017-11-02 17:40:35.816161798 +0100
4 @@ -23,7 +23,9 @@
5 #include <sstream>
6 #include <string>
7 #include <vector>
8 +#ifndef __ANDROID__
9 #include <langinfo.h>
10 +#endif
11 #include <string.h>
12
13 #include <apti18n.h>
14 @@ -151,12 +153,14 @@
15 orig = Section.FindS("Description");
16 }
17
18 +#ifndef __ANDROID__
19 char const * const codeset = nl_langinfo(CODESET);
20 if (strcmp(codeset,"UTF-8") != 0) {
21 string dest;
22 UTF8ToCodeset(codeset, orig, &dest);
23 return dest;
24 }
25 +#endif
26
27 return orig;
28 }