diff options
author | Koop Mast <kwm@FreeBSD.org> | 2015-05-31 16:12:17 +0000 |
---|---|---|
committer | Koop Mast <kwm@FreeBSD.org> | 2015-05-31 16:12:17 +0000 |
commit | 59ac13dba54ebd7172f1bfd0cb1432b2b62d3399 (patch) | |
tree | a2efd45edf26768a6a0a49b18e588c602f6ffe79 /audio/pulseaudio/files | |
parent | 780b17f160fc0de10d2a235675bda476261f47e3 (diff) | |
download | ports-59ac13dba54ebd7172f1bfd0cb1432b2b62d3399.tar.gz ports-59ac13dba54ebd7172f1bfd0cb1432b2b62d3399.zip |
Notes
Diffstat (limited to 'audio/pulseaudio/files')
-rw-r--r-- | audio/pulseaudio/files/patch-src_pulse_util.c | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/audio/pulseaudio/files/patch-src_pulse_util.c b/audio/pulseaudio/files/patch-src_pulse_util.c new file mode 100644 index 000000000000..3d8481e0491a --- /dev/null +++ b/audio/pulseaudio/files/patch-src_pulse_util.c @@ -0,0 +1,35 @@ +--- src/pulse/util.c.orig 2015-02-12 15:10:35.000000000 +0100 ++++ src/pulse/util.c 2015-05-31 17:50:08.221242000 +0200 +@@ -30,6 +30,10 @@ + #include <time.h> + #include <unistd.h> + #include <sys/types.h> ++#ifdef __FreeBSD__ ++#include <sys/sysctl.h> ++#include <sys/user.h> ++#endif + + #ifdef HAVE_PWD_H + #include <pwd.h> +@@ -215,13 +219,14 @@ char *pa_get_binary_name(char *s, size_t + + #ifdef __FreeBSD__ + { +- char *rp; +- +- if ((rp = pa_readlink("/proc/curproc/file"))) { +- pa_strlcpy(s, pa_path_get_filename(rp), l); +- pa_xfree(rp); +- return s; +- } ++ int mib[] = { CTL_KERN, KERN_PROC, KERN_PROC_PID, getpid()}; ++ struct kinfo_proc kp; ++ size_t sz = sizeof(kp); ++ ++ if (sysctl(mib, 4, &kp, &sz, NULL, 0) == 0) ++ return kp.ki_comm; ++ else ++ return NULL; + } + #endif + |