Merge commit 'refs/top-bases/linux-symbol-collisions' into linux-symbol-collisions

This commit is contained in:
Brian Behlendorf 2008-12-15 16:56:07 -08:00
commit 6b4a70c477
7 changed files with 87 additions and 0 deletions

24
config/kernel-bio-args.m4 Normal file
View File

@ -0,0 +1,24 @@
dnl #
dnl # 2.6.x API change
dnl # bio_end_io_t uses 2 args (size was dropped from prototype)
dnl #
AC_DEFUN([ZFS_AC_CONFIG_KERNEL_BIO_ARGS],
[AC_MSG_CHECKING([whether bio_end_io_t wants 2 args])
tmp_flags="$EXTRA_KCFLAGS"
EXTRA_KCFLAGS="-Werror"
ZFS_LINUX_TRY_COMPILE([
#include <linux/bio.h>
],[
void (*wanted_end_io)(struct bio *, int) = NULL;
bio_end_io_t *local_end_io;
local_end_io = wanted_end_io;
],[
AC_MSG_RESULT(yes)
AC_DEFINE(HAVE_2ARGS_BIO_END_IO_T, 1,
[bio_end_io_t wants 2 args])
],[
AC_MSG_RESULT(no)
])
EXTRA_KCFLAGS="$tmp_flags"
])

View File

@ -37,4 +37,6 @@ AC_DEFUN([ZFS_AC_CONFIG_KERNEL], [
AC_SUBST(KERNELMAKE_PARAMS)
AC_SUBST(KERNELCPPFLAGS)
AC_SUBST(HOSTCFLAGS)
ZFS_AC_CONFIG_KERNEL_BIO_ARGS
])

35
config/user-ioctl.m4 Normal file
View File

@ -0,0 +1,35 @@
dnl #
dnl # Check for ioctl()
dnl #
AC_DEFUN([ZFS_AC_CONFIG_USER_IOCTL], [
AC_MSG_CHECKING(checking for ioctl())
AC_EGREP_HEADER(ioctl, unistd.h, is_unistd=yes, is_unistd=no)
AC_EGREP_HEADER(ioctl, sys/ioctl.h, is_sys_ioctl=yes, is_sys_ioctl=no)
AC_EGREP_HEADER(ioctl, stropts.h, is_stropts=yes, is_stropts=no)
if test $is_unistd = yes; then
result=unistd.h
AC_DEFINE([HAVE_IOCTL_IN_UNISTD_H], 1,
[Define to 1 if ioctl() defined in <unistd.h>])
else
if test $is_sys_ioctl = yes; then
result=sys/ioctl.h
AC_DEFINE([HAVE_IOCTL_IN_SYS_IOCTL_H], 1,
[Define to 1 if ioctl() defined in <sys/ioctl.h>])
elif test $is_stropts = yes; then
AC_DEFINE([HAVE_IOCTL_IN_STROPTS_H], 1,
result=stropts.h
[Define to 1 if ioctl() defined in <stropts.h>])
else
result=no
fi
fi
if test $result = no; then
AC_MSG_RESULT([no])
AC_MSG_ERROR([*** Cannot locate ioctl() definition])
else
AC_MSG_RESULT(yes)
fi
])

View File

@ -0,0 +1,8 @@
dnl #
dnl # Check for libdiskmgt
dnl #
AC_DEFUN([ZFS_AC_CONFIG_USER_LIBDISKMGT], [
AC_CHECK_LIB([diskmgt], [libdiskmgt_error],
[AC_DEFINE([HAVE_LIBDISKMGT], 1,
[Define to 1 if 'libdiskmgt' library available])])
])

8
config/user-libefi.m4 Normal file
View File

@ -0,0 +1,8 @@
dnl #
dnl # Check for libefi
dnl #
AC_DEFUN([ZFS_AC_CONFIG_USER_LIBEFI], [
AC_CHECK_LIB([efi], [efi_alloc_and_init],
[AC_DEFINE([HAVE_LIBEFI], 1,
[Define to 1 if 'libefi' library available])])
])

8
config/user-libshare.m4 Normal file
View File

@ -0,0 +1,8 @@
dnl #
dnl # Check for libshare
dnl #
AC_DEFUN([ZFS_AC_CONFIG_USER_LIBSHARE], [
AC_CHECK_LIB([share], [sa_init],
[AC_DEFINE([HAVE_LIBSHARE], 1,
[Define to 1 if 'libshare' library available])])
])

View File

@ -3,5 +3,7 @@ dnl # Default ZFS user configuration
dnl #
AC_DEFUN([ZFS_AC_CONFIG_USER], [
ZFS_AC_CONFIG_USER_LIBEFI
ZFS_AC_CONFIG_USER_LIBDISKMGT
ZFS_AC_CONFIG_USER_LIBSHARE
ZFS_AC_CONFIG_USER_IOCTL
])