Project

General

Profile

Bug #9732 » 16-module-gsettings.patch

Gary Mills, 2020-09-14 09:32 PM

View differences:

pulseaudio-13.0/src/modules/gsettings/module-gsettings.c Sun Aug 9 15:20:19 2020
23 23

  
24 24
#include <sys/types.h>
25 25
#include <sys/wait.h>
26
#include <unistd.h>
27
#include <sys/fcntl.h>
26 28

  
27 29
#include <pulsecore/core-error.h>
28 30
#include <pulsecore/core-util.h>
......
38 40
int pa__init(pa_module*m) {
39 41
    struct userdata *u;
40 42
    int r;
43
    char *helper;
41 44

  
42 45
    u = pa_xnew(struct userdata, 1);
43 46
    u->core = m->core;
......
50 53
    u->io_event = NULL;
51 54
    u->buf_fill = 0;
52 55

  
53
    if ((u->fd = pa_start_child_for_read(
56
    helper =
54 57
#if defined(__linux__) && defined(HAVE_RUNNING_FROM_BUILD_TREE)
55
                              pa_run_from_build_tree() ? PA_BUILDDIR "/gsettings-helper" :
58
	pa_run_from_build_tree() ? PA_BUILDDIR "/gsettings-helper" :
56 59
#endif
57
                 PA_GSETTINGS_HELPER, NULL, &u->pid)) < 0)
60
	PA_GSETTINGS_HELPER;
61

  
62
    if (access(helper, X_OK) != 0) {
63
        pa_log_error("failed to access %s for execute: %s", helper,
64
            pa_cstrerror(errno));
58 65
        goto fail;
66
    }
67
 
68
    if ((u->fd = pa_start_child_for_read(helper, NULL, &u->pid)) < 0)
69
        goto fail;
59 70

  
60 71
    u->io_event = m->core->mainloop->io_new(
61 72
            m->core->mainloop,
(11-11/11)