SecBSD's official ports repository
This commit is contained in:
commit
2c0afcbbf3
64331 changed files with 5339189 additions and 0 deletions
48
audio/pulseaudio/patches/patch-src_pulse_util_c
Normal file
48
audio/pulseaudio/patches/patch-src_pulse_util_c
Normal file
|
@ -0,0 +1,48 @@
|
|||
Implement pa_get_binary_name().
|
||||
|
||||
Index: src/pulse/util.c
|
||||
--- src/pulse/util.c.orig
|
||||
+++ src/pulse/util.c
|
||||
@@ -52,6 +52,11 @@
|
||||
#include <sys/sysctl.h>
|
||||
#endif
|
||||
|
||||
+#ifdef __OpenBSD__
|
||||
+#include <libgen.h>
|
||||
+#include <sys/sysctl.h>
|
||||
+#endif
|
||||
+
|
||||
#include <pulse/xmalloc.h>
|
||||
#include <pulse/timeval.h>
|
||||
|
||||
@@ -253,6 +258,30 @@ char *pa_get_binary_name(char *s, size_t l) {
|
||||
}
|
||||
}
|
||||
#endif
|
||||
+
|
||||
+#ifdef __OpenBSD__
|
||||
+ {
|
||||
+ size_t len;
|
||||
+ char **buf;
|
||||
+
|
||||
+ int mib[] = { CTL_KERN, KERN_PROC_ARGS, getpid(), KERN_PROC_ARGV };
|
||||
+
|
||||
+ if (sysctl (mib, 4, NULL, &len, NULL, 0) == -1)
|
||||
+ return NULL;
|
||||
+
|
||||
+ buf = (char *) pa_xmalloc(len);
|
||||
+
|
||||
+ if (sysctl(mib, 4, buf, &len, NULL, 0) == 0) {
|
||||
+ pa_strlcpy(s, basename(*buf), l);
|
||||
+ pa_xfree(buf);
|
||||
+ return s;
|
||||
+ }
|
||||
+
|
||||
+ pa_xfree(buf);
|
||||
+
|
||||
+ /* fall thru */
|
||||
+ }
|
||||
+#endif /* __OpenBSD__ */
|
||||
|
||||
#if defined(HAVE_DLADDR) && defined(PA_GCC_WEAKREF)
|
||||
{
|
Loading…
Add table
Add a link
Reference in a new issue