gnupg: Avoid hardlink test and debug message

This commit is contained in:
Fredrik Fornwall 2018-08-06 01:38:01 +02:00
parent 00b9628faf
commit f91900f1bf
2 changed files with 35 additions and 1 deletions

View File

@ -1,7 +1,7 @@
TERMUX_PKG_HOMEPAGE=https://www.gnupg.org/
TERMUX_PKG_DESCRIPTION="Implementation of the OpenPGP standard for encrypting and signing data and communication"
TERMUX_PKG_VERSION=2.2.9
TERMUX_PKG_REVISION=1
TERMUX_PKG_REVISION=2
TERMUX_PKG_SHA256=6278eaabffa1ebc9fa2ceb3dc53eea9a1505ab02a668a86dd6fec06951af2164
TERMUX_PKG_SRCURL=https://www.gnupg.org/ftp/gcrypt/gnupg/gnupg-${TERMUX_PKG_VERSION}.tar.bz2
TERMUX_PKG_DEPENDS="libassuan,libbz2,libgcrypt,libksba,libsqlite,libnpth,readline,pinentry,libgpg-error"

View File

@ -0,0 +1,34 @@
Android does not support hardlinks so no need to try or nag.
diff -u -r ../gnupg-2.2.9/common/dotlock.c ./common/dotlock.c
--- ../gnupg-2.2.9/common/dotlock.c 2017-08-28 10:22:54.000000000 +0000
+++ ./common/dotlock.c 2018-08-05 21:40:02.699642490 +0000
@@ -605,6 +605,9 @@
static int
use_hardlinks_p (const char *tname)
{
+#ifdef __ANDROID__
+ return 1;
+#else
char *lname;
struct stat sb;
unsigned int nlink;
@@ -633,6 +636,7 @@
unlink (lname);
xfree (lname);
return res;
+#endif
}
#endif /*HAVE_POSIX_SYSTEM */
@@ -758,8 +762,10 @@
}
strcpy (stpcpy (h->lockname, file_to_lock), EXTSEP_S "lock");
UNLOCK_all_lockfiles ();
+#ifndef __ANDROID__
if (h->use_o_excl)
my_debug_1 ("locking for '%s' done via O_EXCL\n", h->lockname);
+#endif
return h;