From 17d13c07868f8c1304b2e954254d48446ee36e0d Mon Sep 17 00:00:00 2001 From: Leonid Pliushch Date: Sun, 5 Jan 2020 16:06:44 +0200 Subject: [PATCH] xorg-iceauth: attempt 2 to disable hardlinking --- x11-packages/xorg-iceauth/build.sh | 2 +- x11-packages/xorg-iceauth/process.c.patch | 14 +++++++++----- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/x11-packages/xorg-iceauth/build.sh b/x11-packages/xorg-iceauth/build.sh index 06925dd74..caacf1688 100644 --- a/x11-packages/xorg-iceauth/build.sh +++ b/x11-packages/xorg-iceauth/build.sh @@ -3,7 +3,7 @@ TERMUX_PKG_DESCRIPTION="ICE authority file utility" TERMUX_PKG_LICENSE="MIT" TERMUX_PKG_MAINTAINER="Leonid Plyushch " TERMUX_PKG_VERSION=1.0.8 -TERMUX_PKG_REVISION=4 +TERMUX_PKG_REVISION=5 TERMUX_PKG_SRCURL=https://www.x.org/archive/individual/app/iceauth-$TERMUX_PKG_VERSION.tar.gz TERMUX_PKG_SHA256=25b94613173a6dd28d7b18d9479194aae3d9392f5a4a072f499bd48d3ca00740 TERMUX_PKG_DEPENDS="libice" diff --git a/x11-packages/xorg-iceauth/process.c.patch b/x11-packages/xorg-iceauth/process.c.patch index 2547b1335..eb27f4fa3 100644 --- a/x11-packages/xorg-iceauth/process.c.patch +++ b/x11-packages/xorg-iceauth/process.c.patch @@ -1,12 +1,16 @@ diff -uNr iceauth-1.0.8/process.c iceauth-1.0.8.mod/process.c --- iceauth-1.0.8/process.c 2018-03-05 06:06:49.000000000 +0200 -+++ iceauth-1.0.8.mod/process.c 2020-01-05 15:31:47.723588417 +0200 -@@ -686,7 +686,7 @@ ++++ iceauth-1.0.8.mod/process.c 2020-01-05 16:05:53.318868140 +0200 +@@ -686,12 +686,7 @@ ProgramName, temp_name); } else { (void) unlink (iceauth_filename); -#if defined(WIN32) || defined(__UNIXOS2__) -+#if defined(WIN32) || defined(__UNIXOS2__) || defined(__ANDROID__) if (rename(temp_name, iceauth_filename) == -1) - #else - /* Attempt to rename() if link() fails, since this may be on a FS that does not support hard links */ +-#else +- /* Attempt to rename() if link() fails, since this may be on a FS that does not support hard links */ +- if (link (temp_name, iceauth_filename) == -1 && rename(temp_name, iceauth_filename) == -1) +-#endif + { + fprintf (stderr, + "%s: unable to link authority file %s, use %s\n",