mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-25 19:57:43 +03:00
Add class / device portability code. Two autoconf tests
were added to cover the 3 possible APIs from 2.6.9 to 2.6.26. We attempt to use the newest interfaces and if not available fallback to the oldest. This a rework of some changes proposed by Ricardo for RHEL4. git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@150 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c
This commit is contained in:
@@ -457,3 +457,31 @@ AC_DEFUN([SPL_AC_FLS64],
|
||||
AC_MSG_RESULT(no)
|
||||
])
|
||||
])
|
||||
|
||||
dnl #
|
||||
dnl # 2.6.18 API change, check whether device_create() is available.
|
||||
dnl # Device_create() was introduced in 2.6.18 and depricated
|
||||
dnl # class_device_create() which was fully removed in 2.6.26.
|
||||
dnl #
|
||||
AC_DEFUN([SPL_AC_DEVICE_CREATE], [
|
||||
SPL_CHECK_SYMBOL_EXPORT(
|
||||
[device_create],
|
||||
[drivers/base/core.c],
|
||||
[AC_DEFINE(HAVE_DEVICE_CREATE, 1,
|
||||
[device_create() is available])],
|
||||
[])
|
||||
])
|
||||
|
||||
dnl #
|
||||
dnl # 2.6.13 API change, check whether class_device_create() is available.
|
||||
dnl # Class_device_create() was introduced in 2.6.13 and depricated
|
||||
dnl # class_simple_device_add() which was fully removed in 2.6.13.
|
||||
dnl #
|
||||
AC_DEFUN([SPL_AC_CLASS_DEVICE_CREATE], [
|
||||
SPL_CHECK_SYMBOL_EXPORT(
|
||||
[class_device_create],
|
||||
[drivers/base/class.c],
|
||||
[AC_DEFINE(HAVE_CLASS_DEVICE_CREATE, 1,
|
||||
[class_device_create() is available])],
|
||||
[])
|
||||
])
|
||||
|
||||
Reference in New Issue
Block a user