2018-02-07 22:50:24 +03:00
|
|
|
dnl #
|
|
|
|
dnl # 2.6.39 API compat,
|
2019-10-01 22:50:34 +03:00
|
|
|
dnl
|
2018-02-07 22:50:24 +03:00
|
|
|
dnl # The function zlib_deflate_workspacesize() now take 2 arguments.
|
|
|
|
dnl # This was done to avoid always having to allocate the maximum size
|
|
|
|
dnl # workspace (268K). The caller can now specific the windowBits and
|
|
|
|
dnl # memLevel compression parameters to get a smaller workspace.
|
|
|
|
dnl #
|
2019-10-01 22:50:34 +03:00
|
|
|
AC_DEFUN([ZFS_AC_KERNEL_SRC_2ARGS_ZLIB_DEFLATE_WORKSPACESIZE], [
|
|
|
|
ZFS_LINUX_TEST_SRC([2args_zlib_deflate_workspacesize], [
|
2018-02-07 22:50:24 +03:00
|
|
|
#include <linux/zlib.h>
|
|
|
|
],[
|
|
|
|
return zlib_deflate_workspacesize(MAX_WBITS, MAX_MEM_LEVEL);
|
2019-10-01 22:50:34 +03:00
|
|
|
])
|
|
|
|
])
|
|
|
|
|
|
|
|
AC_DEFUN([ZFS_AC_KERNEL_2ARGS_ZLIB_DEFLATE_WORKSPACESIZE], [
|
|
|
|
AC_MSG_CHECKING([whether zlib_deflate_workspacesize() wants 2 args])
|
|
|
|
ZFS_LINUX_TEST_RESULT([2args_zlib_deflate_workspacesize], [
|
2018-02-07 22:50:24 +03:00
|
|
|
AC_MSG_RESULT(yes)
|
|
|
|
AC_DEFINE(HAVE_2ARGS_ZLIB_DEFLATE_WORKSPACESIZE, 1,
|
2019-10-01 22:50:34 +03:00
|
|
|
[zlib_deflate_workspacesize() wants 2 args])
|
2018-02-07 22:50:24 +03:00
|
|
|
],[
|
|
|
|
AC_MSG_RESULT(no)
|
|
|
|
])
|
|
|
|
])
|