We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 14a9cff commit d19d0a1Copy full SHA for d19d0a1
ossp-padsp.c
@@ -22,6 +22,8 @@
22
#include <sys/stat.h>
23
#include <sys/types.h>
24
#include <unistd.h>
25
+#include <linux/limits.h>
26
+#include <stdlib.h>
27
28
#include <pulse/pulseaudio.h>
29
#include <sys/soundcard.h>
@@ -1534,9 +1536,15 @@ static void action_post(void)
1534
1536
int main(int argc, char **argv)
1535
1537
{
1538
int rc;
1539
+ static char runtime_dir[PATH_MAX];
1540
1541
ossp_slave_init(argc, argv);
1542
1543
+ snprintf(runtime_dir, sizeof runtime_dir, "/run/user/%llu",
1544
+ (long long unsigned) getuid());
1545
+ if (access(runtime_dir, R_OK | X_OK) == 0)
1546
+ setenv("XDG_RUNTIME_DIR", runtime_dir, 0);
1547
+
1548
page_size = sysconf(_SC_PAGE_SIZE);
1549
1550
mainloop = pa_threaded_mainloop_new();
0 commit comments