mirror of
				https://git.proxmox.com/git/mirror_zfs
				synced 2025-11-04 14:26:57 +00:00 
			
		
		
		
	This patch adds a new autoconf function: ZFS_LINUX_TRY_COMPILE_SYMBOL. This new function does the following: - Call LINUX_TRY_COMPILE with the specified parameters. - If unsuccessful, return false. - If successful and we're configuring with --enable-linux-builtin, return true. - Else, call CHECK_SYMBOL_EXPORT with the specified parameters and return the result. All calls to CHECK_SYMBOL_EXPORT are converted to LINUX_TRY_COMPILE_SYMBOL so that the tests work even when configuring for builtin on a kernel which doesn't have loadable module support, or hasn't been built yet. Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> Issue #851
		
			
				
	
	
		
			19 lines
		
	
	
		
			507 B
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			19 lines
		
	
	
		
			507 B
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
dnl #
 | 
						|
dnl # 2.6.28 API change
 | 
						|
dnl # Added check_disk_size_change() helper function.
 | 
						|
dnl #
 | 
						|
AC_DEFUN([ZFS_AC_KERNEL_CHECK_DISK_SIZE_CHANGE],
 | 
						|
	[AC_MSG_CHECKING([whether check_disk_size_change() is available])
 | 
						|
	ZFS_LINUX_TRY_COMPILE_SYMBOL([
 | 
						|
		#include <linux/fs.h>
 | 
						|
	], [
 | 
						|
		check_disk_size_change(NULL, NULL);
 | 
						|
	], [check_disk_size_change], [fs/block_dev.c], [
 | 
						|
		AC_MSG_RESULT(yes)
 | 
						|
		AC_DEFINE(HAVE_CHECK_DISK_SIZE_CHANGE, 1,
 | 
						|
		          [check_disk_size_change() is available])
 | 
						|
	], [
 | 
						|
		AC_MSG_RESULT(no)
 | 
						|
	])
 | 
						|
])
 |