pkgsrc/security/lastpass-cli/patches/patch-process.c
jperkin 413a98c540 Import lastpass-cli version 1.2.1 as security/lastpass-cli.
LastPass is a password management service that stores encrypted passwords
in private accounts.  LastPass is standard with a web interface, but also
includes plugins for many web browsers and apps for many smartphones.

This package provides the lpass command, a command line interface to the
LastPass.com API.
2017-08-16 15:18:24 +00:00

20 lines
668 B
C

$NetBSD: patch-process.c,v 1.1 2017/08/16 15:18:24 jperkin Exp $
Support pid_to_cmd on SunOS.
--- process.c.orig 2017-06-28 12:50:49.000000000 +0000
+++ process.c
@@ -83,6 +83,13 @@ static int pid_to_cmd(pid_t pid, char *c
xasprintf(&proc, "/proc/%lu/exe", (unsigned long)pid);
return readlink(proc, cmd, cmd_size - 1);
}
+#elif defined(__sun)
+static int pid_to_cmd(pid_t pid, char *cmd, size_t cmd_size)
+{
+ _cleanup_free_ char *proc;
+ xasprintf(&proc, "/proc/%lu/path/a.out", (unsigned long)pid);
+ return readlink(proc, cmd, cmd_size - 1);
+}
#elif defined(__APPLE__) && defined(__MACH__)
static int pid_to_cmd(pid_t pid, char *cmd, size_t cmd_size)
{