mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-10-31 22:25:33 -04:00
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
This commit is contained in:
parent
2409f1a80b
commit
b12f29d04b
1 changed files with 5 additions and 1 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue