apt: fix arguments for getsockopt causing errors on i686

This commit is contained in:
Leonid Pliushch 2020-11-05 18:29:01 +02:00
parent e217e4cf04
commit 9dffff8858
6 changed files with 13 additions and 1 deletions

View File

@ -0,0 +1,12 @@
diff -uNr apt-2.1.11/methods/connect.cc apt-2.1.11.mod/methods/connect.cc
--- apt-2.1.11/methods/connect.cc 2020-11-05 18:22:37.313283369 +0200
+++ apt-2.1.11.mod/methods/connect.cc 2020-11-05 18:22:52.713391462 +0200
@@ -198,7 +198,7 @@
{
// Check the socket for an error condition
unsigned int Err;
- unsigned int Len = sizeof(Err);
+ socklen_t Len = sizeof(Err);
if (getsockopt(Fd->Fd(), SOL_SOCKET, SO_ERROR, &Err, &Len) != 0)
{
_error->Errno("getsockopt", _("Failed"));

View File

@ -56,7 +56,7 @@ termux_step_pre_configure() {
# Prefix verification patch should be applied only for the
# builds with original prefix.
if [ "$TERMUX_PREFIX" = "/data/data/com.termux/files/usr" ]; then
patch -p1 -i $TERMUX_PKG_BUILDER_DIR/0011-verify-prefix.patch.txt
patch -p1 -i $TERMUX_PKG_BUILDER_DIR/0012-verify-prefix.patch.txt
fi
# Fix i686 builds.