]>
Commit | Line | Data |
---|---|---|
031cea17 TH |
1 | dnl # |
2 | dnl # Linux 5.0: totalram_pages is no longer a global variable, and must be | |
3 | dnl # read via the totalram_pages() helper function. | |
4 | dnl # | |
5 | AC_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 | ]) |