termux-packages/x11-packages/xorg-xauth/xauth-1.0.10_process.c.patch

21 lines
844 B
Diff
Raw Normal View History

diff -uNr xauth-1.0.10/process.c xauth-1.0.10.mod/process.c
--- xauth-1.0.10/process.c 2017-01-29 23:00:12.000000000 +0200
+++ xauth-1.0.10.mod/process.c 2018-10-03 02:07:13.062110327 +0300
@@ -891,15 +891,10 @@
ProgramName, temp_name);
} else {
(void) unlink (xauth_filename);
-#if defined(WIN32) || defined(__UNIXOS2__)
if (rename(temp_name, xauth_filename) == -1)
-#else
- /* Attempt to rename() if link() fails, since this may be on a FS that does not support hard links */
- if (link (temp_name, xauth_filename) == -1 && rename(temp_name, xauth_filename) == -1)
-#endif
{
fprintf (stderr,
- "%s: unable to link authority file %s, use %s\n",
+ "%s: unable to link/rename authority file %s, use %s\n",
ProgramName, xauth_filename, temp_name);
} else {
(void) unlink (temp_name);