src/pulsecore/core-util.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
New commits: commit 6f954c76745acaaa8cae5a569702e23e83115b3b Author: Ryan Lortie <de...@desrt.ca> Date: Tue Dec 10 13:27:52 2013 -0500 core-util: set_scheduler: check for RLIMIT_RTTIME set_scheduler() assumes that if sys/resource.h was found then we will find RLIMIT_RTTIME there, but this is a non-POSIX extension on Linux. Change the check to ensure that RLIMIT_RTTIME is actually defined. Linux indeed defines this as a macro, and POSIX specifies that the other RLIMIT_ constants must be macros, so having this as an #ifdef seems correct. diff --git a/src/pulsecore/core-util.c b/src/pulsecore/core-util.c index 06c3884..2efa280 100644 --- a/src/pulsecore/core-util.c +++ b/src/pulsecore/core-util.c @@ -707,7 +707,7 @@ static int set_scheduler(int rtprio) { #ifdef HAVE_DBUS int r; long long rttime; -#ifdef HAVE_SYS_RESOURCE_H +#ifdef RLIMIT_RTTIME struct rlimit rl; #endif DBusError error; @@ -749,7 +749,7 @@ static int set_scheduler(int rtprio) { rttime = rtkit_get_rttime_usec_max(bus); if (rttime >= 0) { -#ifdef HAVE_SYS_RESOURCE_H +#ifdef RLIMIT_RTTIME r = getrlimit(RLIMIT_RTTIME, &rl); if (r >= 0 && (long long) rl.rlim_max > rttime) { _______________________________________________ pulseaudio-commits mailing list pulseaudio-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/pulseaudio-commits