termux-packages/x11-packages/emacs-x/lib-src-emacsclient.c.patch

19 lines
750 B
Diff
Raw Normal View History

2019-09-18 22:09:45 +02:00
--- ../emacsclient.c.orig 2019-08-29 20:08:48.840624090 +0200
+++ ./lib-src/emacsclient.c 2019-08-29 20:13:37.425382182 +0200
@@ -1289,11 +1289,12 @@
}
else
#endif
- tmpdir = "/tmp";
+ tmpdir = "@TERMUX_PREFIX@/tmp";
}
2019-09-18 22:09:45 +02:00
+ /* Use $PREFIX/var/run instead of $TMPDIR in termux. */
socket_name_storage =
2019-09-18 22:09:45 +02:00
- xmalloc (strlen (tmpdir) + strlen (server_name) + EXTRA_SPACE);
- char *z = stpcpy (socket_name_storage, tmpdir);
+ xmalloc (strlen ("@TERMUX_PREFIX@/var/run") + strlen (server_name) + EXTRA_SPACE);
+ char *z = stpcpy (socket_name_storage, "@TERMUX_PREFIX@/var/run");
z += sprintf (z, "/emacs%ld/", uid);
strcpy (z, server_name);
local_socket_name = socket_name_storage;