* modules/get-rusage-data (configure.ac): Test whether sbrk exists.
* lib/get-rusage-data.c (get_rusage_data_via_setrlimit): Define
trivially of sbrk is not available.
* doc/glibc-functions/sbrk.texi: Mention that the function does not
exist in FreeBSD 12.2/arm64.
* doc/glibc-functions/brk.texi: Likewise.
+2020-12-07 Bruno Haible <bruno@clisp.org>
+
+ get-rusage-data: Fix link error on FreeBSD 12.2/arm64.
+ * modules/get-rusage-data (configure.ac): Test whether sbrk exists.
+ * lib/get-rusage-data.c (get_rusage_data_via_setrlimit): Define
+ trivially of sbrk is not available.
+ * doc/glibc-functions/sbrk.texi: Mention that the function does not
+ exist in FreeBSD 12.2/arm64.
+ * doc/glibc-functions/brk.texi: Likewise.
+
2020-12-07 Bruno Haible <bruno@clisp.org>
Correct interaction between gl_ANSI_CXX and AC_PROG_CXX.
@itemize
@item
This function is missing on some platforms:
-AIX 5.1, Cygwin 2.9, mingw, MSVC 14.
+FreeBSD 12.2/arm64, AIX 5.1, Cygwin 2.9, mingw, MSVC 14.
@end itemize
@itemize
@item
This function is missing on some platforms:
-AIX 5.1, mingw, MSVC 14.
+FreeBSD 12.2/arm64, AIX 5.1, mingw, MSVC 14.
@end itemize
#if !(defined __APPLE__ && defined __MACH__) || defined TEST
/* Implement get_rusage_data_via_setrlimit(). */
-# if HAVE_SETRLIMIT && defined RLIMIT_DATA && !defined __HAIKU__
+# if HAVE_SETRLIMIT && defined RLIMIT_DATA && HAVE_SBRK && !defined __HAIKU__
# ifdef _AIX
# define errno_expected() (errno == EINVAL || errno == EFAULT)
struct rlimit orig_limit;
# ifdef __hpux
- /* On HP-UX 11.00, setrlimit() RLIMIT_DATA of does not work: It cannot
+ /* On HP-UX 11.00, setrlimit() of RLIMIT_DATA does not work: It cannot
restore the previous limits.
- On HP-UX 11.11, setrlimit() RLIMIT_DATA of does not work: It sometimes
+ On HP-UX 11.11, setrlimit() of RLIMIT_DATA does not work: It sometimes
has no effect on the next sbrk() call. */
{
struct utsname buf;
vma-iter
configure.ac:
-AC_CHECK_FUNCS_ONCE([setrlimit])
+AC_CHECK_FUNCS_ONCE([sbrk setrlimit])
gl_FUNC_MMAP_ANON
Makefile.am: