summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/daemon/daemon-conf.c6
-rw-r--r--src/pulsecore/core-util.c4
-rw-r--r--src/pulsecore/memtrap.c2
-rw-r--r--src/pulsecore/shm.c2
-rw-r--r--src/utils/pacat.c2
5 files changed, 11 insertions, 5 deletions
diff --git a/src/daemon/daemon-conf.c b/src/daemon/daemon-conf.c
index 3339f3b0..e38e67ad 100644
--- a/src/daemon/daemon-conf.c
+++ b/src/daemon/daemon-conf.c
@@ -293,8 +293,8 @@ static int parse_resample_method(const char *filename, unsigned line, const char
return 0;
}
-static int parse_rlimit(const char *filename, unsigned line, const char *section, const char *lvalue, const char *rvalue, void *data, void *userdata) {
#ifdef HAVE_SYS_RESOURCE_H
+static int parse_rlimit(const char *filename, unsigned line, const char *section, const char *lvalue, const char *rvalue, void *data, void *userdata) {
struct pa_rlimit *r = data;
pa_assert(filename);
@@ -315,12 +315,10 @@ static int parse_rlimit(const char *filename, unsigned line, const char *section
r->is_set = k >= 0;
r->value = k >= 0 ? (rlim_t) k : 0;
}
-#else
- pa_log_warn(_("[%s:%u] rlimit not supported on this platform."), filename, line);
-#endif
return 0;
}
+#endif
static int parse_sample_format(const char *filename, unsigned line, const char *section, const char *lvalue, const char *rvalue, void *data, void *userdata) {
pa_daemon_conf *c = data;
diff --git a/src/pulsecore/core-util.c b/src/pulsecore/core-util.c
index 8a377e37..02e9bf63 100644
--- a/src/pulsecore/core-util.c
+++ b/src/pulsecore/core-util.c
@@ -620,6 +620,7 @@ char *pa_strlcpy(char *b, const char *s, size_t l) {
return b;
}
+#ifdef _POSIX_PRIORITY_SCHEDULING
static int set_scheduler(int rtprio) {
#ifdef HAVE_SCHED_H
struct sched_param sp;
@@ -677,6 +678,7 @@ static int set_scheduler(int rtprio) {
return -1;
}
+#endif
/* Make the current thread a realtime thread, and acquire the highest
* rtprio we can get that is less or equal the specified parameter. If
@@ -713,6 +715,7 @@ int pa_make_realtime(int rtprio) {
return -1;
}
+#ifdef HAVE_SYS_RESOURCE_H
static int set_nice(int nice_level) {
#ifdef HAVE_DBUS
DBusError error;
@@ -757,6 +760,7 @@ static int set_nice(int nice_level) {
return -1;
}
+#endif
/* Raise the priority of the current process as much as possible that
* is <= the specified nice level..*/
diff --git a/src/pulsecore/memtrap.c b/src/pulsecore/memtrap.c
index b56d806a..4df1fb71 100644
--- a/src/pulsecore/memtrap.c
+++ b/src/pulsecore/memtrap.c
@@ -67,11 +67,11 @@ pa_bool_t pa_memtrap_is_good(pa_memtrap *m) {
return !pa_atomic_load(&m->bad);
}
+#ifdef HAVE_SIGACTION
static void sigsafe_error(const char *s) {
(void) write(STDERR_FILENO, s, strlen(s));
}
-#ifdef HAVE_SIGACTION
static void signal_handler(int sig, siginfo_t* si, void *data) {
unsigned j;
pa_memtrap *m;
diff --git a/src/pulsecore/shm.c b/src/pulsecore/shm.c
index 5d5d85ab..da8aff70 100644
--- a/src/pulsecore/shm.c
+++ b/src/pulsecore/shm.c
@@ -90,10 +90,12 @@ struct shm_marker {
#define SHM_MARKER_SIZE PA_ALIGN(sizeof(struct shm_marker))
+#ifdef HAVE_SHM_OPEN
static char *segment_name(char *fn, size_t l, unsigned id) {
pa_snprintf(fn, l, "/pulse-shm-%u", id);
return fn;
}
+#endif
int pa_shm_create_rw(pa_shm *m, size_t size, pa_bool_t shared, mode_t mode) {
char fn[32];
diff --git a/src/utils/pacat.c b/src/utils/pacat.c
index 79936fd7..6cd01d21 100644
--- a/src/utils/pacat.c
+++ b/src/utils/pacat.c
@@ -604,6 +604,7 @@ static void stream_update_timing_callback(pa_stream *s, int success, void *userd
fprintf(stderr, " \r");
}
+#ifdef SIGUSR1
/* Someone requested that the latency is shown */
static void sigusr1_signal_callback(pa_mainloop_api*m, pa_signal_event *e, int sig, void *userdata) {
@@ -612,6 +613,7 @@ static void sigusr1_signal_callback(pa_mainloop_api*m, pa_signal_event *e, int s
pa_operation_unref(pa_stream_update_timing_info(stream, stream_update_timing_callback, NULL));
}
+#endif
static void time_event_callback(pa_mainloop_api *m, pa_time_event *e, const struct timeval *t, void *userdata) {
if (stream && pa_stream_get_state(stream) == PA_STREAM_READY) {