diff options
author | Bruno Haible <bruno@clisp.org> | 2017-10-29 14:33:52 +0100 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2017-10-29 21:27:51 +0100 |
commit | 34a992bf8faa8abb66e8666d76f47b685642918f (patch) | |
tree | a2b40998113d78dff35d63ab69fd15fa869b97e1 /lib/get-rusage-as.c | |
parent | 625f7aea332a6b43fd9be4ce91d805182a5feb0c (diff) | |
download | gnulib-34a992bf8faa8abb66e8666d76f47b685642918f.tar.gz |
get-rusage-as: Avoid crash on Haiku.
Diffstat (limited to 'lib/get-rusage-as.c')
-rw-r--r-- | lib/get-rusage-as.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/get-rusage-as.c b/lib/get-rusage-as.c index 5de4e4e55e..eed267320b 100644 --- a/lib/get-rusage-as.c +++ b/lib/get-rusage-as.c @@ -112,7 +112,7 @@ BeOS, Haiku: a) On BeOS, there is no setrlimit function. - On Haiku, setrlimit exists. RLIMIT_AS is defined but unsupported. + On Haiku, setrlimit exists. RLIMIT_AS is defined but setrlimit fails. b) There is a specific BeOS API: get_next_area_info(). */ @@ -150,7 +150,7 @@ #include "vma-iter.h" -#if HAVE_SETRLIMIT && defined RLIMIT_AS && HAVE_SYS_MMAN_H && HAVE_MPROTECT +#if HAVE_SETRLIMIT && defined RLIMIT_AS && HAVE_SYS_MMAN_H && HAVE_MPROTECT && !defined __HAIKU__ static uintptr_t get_rusage_as_via_setrlimit (void) @@ -365,7 +365,7 @@ get_rusage_as (void) /* get_rusage_as_via_setrlimit() does not work. Prefer get_rusage_as_via_iterator(). */ return get_rusage_as_via_iterator (); -#elif HAVE_SETRLIMIT && defined RLIMIT_AS && HAVE_SYS_MMAN_H && HAVE_MPROTECT +#elif HAVE_SETRLIMIT && defined RLIMIT_AS && HAVE_SYS_MMAN_H && HAVE_MPROTECT && !defined __HAIKU__ /* Prefer get_rusage_as_via_setrlimit() if it succeeds, because the caller may want to use the result with setrlimit(). */ uintptr_t result; |