]> git.proxmox.com Git - mirror_zfs.git/blame - config/kernel-totalram-pages-func.m4
compile with -fno-omit-frame-pointer
[mirror_zfs.git] / config / kernel-totalram-pages-func.m4
CommitLineData
031cea17
TH
1dnl #
2dnl # Linux 5.0: totalram_pages is no longer a global variable, and must be
3dnl # read via the totalram_pages() helper function.
4dnl #
5AC_DEFUN([ZFS_AC_KERNEL_TOTALRAM_PAGES_FUNC], [
6 AC_MSG_CHECKING([whether totalram_pages() exists])
7 ZFS_LINUX_TRY_COMPILE([
8 #include <linux/mm.h>
9 ],[
10 unsigned long pages __attribute__ ((unused));
11 pages = totalram_pages();
12 ],[
13 AC_MSG_RESULT(yes)
14 AC_DEFINE(HAVE_TOTALRAM_PAGES_FUNC, 1, [kernel has totalram_pages()])
15 ],[
16 AC_MSG_RESULT(no)
17 ])
18])