diff options
author | Pierre Ossman <ossman@cendio.se> | 2006-07-20 13:07:01 +0000 |
---|---|---|
committer | Pierre Ossman <ossman@cendio.se> | 2006-07-20 13:07:01 +0000 |
commit | b12f29d04ba9fcaa6930d52b13880086693c0faa (patch) | |
tree | d292ace6562fbb5126256fc925739b776b4285e9 /src | |
parent | 2409f1a80b708ead6c48ebbb568bd2b7d6d3af31 (diff) |
Make sure parse_rlimit is only used when rlimits are supported.
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1117 fefdeb5f-60dc-0310-8127-8f9354f1896f
Diffstat (limited to 'src')
-rw-r--r-- | src/daemon/daemon-conf.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/daemon/daemon-conf.c b/src/daemon/daemon-conf.c index 12ee08001..7184b2e60 100644 --- a/src/daemon/daemon-conf.c +++ b/src/daemon/daemon-conf.c @@ -199,7 +199,8 @@ static int parse_resample_method(const char *filename, unsigned line, const char } static int parse_rlimit(const char *filename, unsigned line, const char *lvalue, const char *rvalue, void *data, PA_GCC_UNUSED void *userdata) { - pa_rlimit *r = data; +#ifdef HAVE_SYS_RESOURCE_H + struct pa_rlimit *r = data; assert(filename); assert(lvalue); assert(rvalue); @@ -218,6 +219,9 @@ static int parse_rlimit(const char *filename, unsigned line, const char *lvalue, r->is_set = k >= 0; r->value = k >= 0 ? (rlim_t) k : 0; } +#else + pa_log_warning(__FILE__": [%s:%u] rlimit not supported on this platform.", filename, line); +#endif return 0; } |