mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-07 13:30:03 -05:00
Apply #ifdefs around functionality not available on win32
And also the reverse: around some win32 specific functionality
This commit is contained in:
parent
0ac0479534
commit
bb12ff8356
20 changed files with 120 additions and 13 deletions
|
|
@ -28,7 +28,10 @@
|
|||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#ifdef HAVE_SCHED_H
|
||||
#include <sched.h>
|
||||
#endif
|
||||
|
||||
#include <pulse/xmalloc.h>
|
||||
#include <pulse/timeval.h>
|
||||
|
|
@ -460,10 +463,12 @@ static int parse_rtprio(const char *filename, unsigned line, const char *section
|
|||
pa_assert(rvalue);
|
||||
pa_assert(data);
|
||||
|
||||
#ifdef HAVE_SCHED_H
|
||||
if (pa_atoi(rvalue, &rtprio) < 0 || rtprio < sched_get_priority_min(SCHED_FIFO) || rtprio > sched_get_priority_max(SCHED_FIFO)) {
|
||||
pa_log("[%s:%u] Invalid realtime priority '%s'.", filename, line, rvalue);
|
||||
return -1;
|
||||
}
|
||||
#endif
|
||||
|
||||
c->realtime_priority = (int) rtprio;
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -90,7 +90,9 @@ static void show_info(const char *name, const char *path, void (*info)(const cha
|
|||
}
|
||||
}
|
||||
|
||||
#ifndef OS_IS_WIN32
|
||||
extern const lt_dlsymlist lt_preloaded_symbols[];
|
||||
#endif
|
||||
|
||||
static int is_preloaded(const char *name) {
|
||||
const lt_dlsymlist *l;
|
||||
|
|
|
|||
|
|
@ -51,6 +51,10 @@
|
|||
#undef PA_BIND_NOW
|
||||
#endif
|
||||
|
||||
#ifdef OS_IS_WIN32
|
||||
#undef PA_BIND_NOW
|
||||
#endif
|
||||
|
||||
#ifdef PA_BIND_NOW
|
||||
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -654,6 +654,7 @@ int main(int argc, char *argv[]) {
|
|||
goto finish;
|
||||
}
|
||||
|
||||
#ifdef HAVE_GETUID
|
||||
if (getuid() == 0 && !conf->system_instance)
|
||||
pa_log_warn(_("This program is not intended to be run as root (unless --system is specified)."));
|
||||
#ifndef HAVE_DBUS /* A similar, only a notice worthy check was done earlier, if D-Bus is enabled. */
|
||||
|
|
@ -662,6 +663,7 @@ int main(int argc, char *argv[]) {
|
|||
goto finish;
|
||||
}
|
||||
#endif
|
||||
#endif /* HAVE_GETUID */
|
||||
|
||||
if (conf->cmd == PA_CMD_START && conf->system_instance) {
|
||||
pa_log(_("--start not supported for system instances."));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue