mirror of
https://github.com/termux/termux-packages.git
synced 2025-01-31 21:22:27 +00:00
03fa1a3c0f
* Build waypipe with C language for now. Rust waypipe needs testing. * Rebase patches after C source files were moved in waypipe-c dir.a605a8ddb2
* Remove src-secctx.c.patch file which was added in upstream.eccbb5cbf1
52 lines
2.1 KiB
Diff
52 lines
2.1 KiB
Diff
--- a/waypipe-c/waypipe.c
|
|
+++ b/waypipe-c/waypipe.c
|
|
@@ -80,8 +80,8 @@
|
|
" -n, --no-gpu disable protocols which would use GPU resources\n"
|
|
" -o, --oneshot only permit one connected application\n"
|
|
" -s, --socket S set the socket path to either create or connect to:\n"
|
|
- " server default: /tmp/waypipe-server.sock\n"
|
|
- " client default: /tmp/waypipe-client.sock\n"
|
|
+ " server default: @TERMUX_PREFIX@/tmp/waypipe-server.sock\n"
|
|
+ " client default: @TERMUX_PREFIX@/tmp/waypipe-client.sock\n"
|
|
" ssh: sets the prefix for the socket path\n"
|
|
" vsock: [[s]CID:]port\n"
|
|
" --version print waypipe version and exit\n"
|
|
@@ -863,7 +863,7 @@
|
|
/* Create a new socket, send it to the compositor to attach
|
|
* a security context and write it to WAYLAND_DISPLAY */
|
|
char secctx_sock_path[108];
|
|
- sprintf(secctx_sock_path, "/tmp/waypipe-secctx-%d", getpid());
|
|
+ sprintf(secctx_sock_path, "@TERMUX_PREFIX@/tmp/waypipe-secctx-%d", getpid());
|
|
unlink(secctx_sock_path);
|
|
char instance_id[21];
|
|
sprintf(instance_id, "%d", getpid());
|
|
@@ -898,7 +898,7 @@
|
|
} else {
|
|
struct socket_path client_sock_path;
|
|
client_sock_path.folder =
|
|
- socketpath ? socketpath : "/tmp/";
|
|
+ socketpath ? socketpath : "@TERMUX_PREFIX@/tmp/";
|
|
client_sock_path.filename = &sockaddr;
|
|
if (!socketpath) {
|
|
sockaddr.sun_family = AF_UNIX;
|
|
@@ -954,7 +954,7 @@
|
|
} else {
|
|
struct socket_path server_sock_path;
|
|
server_sock_path.folder =
|
|
- socketpath ? socketpath : "/tmp/";
|
|
+ socketpath ? socketpath : "@TERMUX_PREFIX@/tmp/";
|
|
server_sock_path.filename = &sockaddr;
|
|
if (!socketpath) {
|
|
sockaddr.sun_family = AF_UNIX;
|
|
@@ -985,8 +985,8 @@
|
|
} else {
|
|
clientsock.sun_family = AF_UNIX;
|
|
strcpy(clientsock.sun_path, "waypipe");
|
|
- strcpy(socket_folder, "/tmp/");
|
|
- socketpath = "/tmp/waypipe";
|
|
+ strcpy(socket_folder, "@TERMUX_PREFIX@/tmp/");
|
|
+ socketpath = "@TERMUX_PREFIX@/tmp/waypipe";
|
|
}
|
|
if (strlen(clientsock.sun_path) +
|
|
sizeof("-server-88888888.sock") >=
|