mirror of
				https://github.com/neovim/neovim.git
				synced 2025-10-26 12:27:24 +00:00 
			
		
		
		
	vim-patch:9.0.1963: Configure script may not detect xattr
Problem:  Configure script may not detect xattr correctly
Solution: include sys/xattr instead of attr/xattr,
          make Test_write_with_xattr_support() test
          xattr feature correctly
This also applies to the Smack security feature, so change the include
and configure script for it as well.
closes: vim/vim#13229
6de4e58cf2
			
			
This commit is contained in:
		| @@ -36,11 +36,13 @@ check_symbol_exists(_NSGetEnviron crt_externs.h HAVE__NSGETENVIRON) | |||||||
| # Headers | # Headers | ||||||
| check_include_files(langinfo.h HAVE_LANGINFO_H) | check_include_files(langinfo.h HAVE_LANGINFO_H) | ||||||
| check_include_files(strings.h HAVE_STRINGS_H) | check_include_files(strings.h HAVE_STRINGS_H) | ||||||
| check_include_files(attr/xattr.h HAVE_XATTR) |  | ||||||
| check_include_files(sys/utsname.h HAVE_SYS_UTSNAME_H) | check_include_files(sys/utsname.h HAVE_SYS_UTSNAME_H) | ||||||
| check_include_files(termios.h HAVE_TERMIOS_H) | check_include_files(termios.h HAVE_TERMIOS_H) | ||||||
| check_include_files(sys/uio.h HAVE_SYS_UIO_H) | check_include_files(sys/uio.h HAVE_SYS_UIO_H) | ||||||
| check_include_files(sys/sdt.h HAVE_SYS_SDT_H) | check_include_files(sys/sdt.h HAVE_SYS_SDT_H) | ||||||
|  | if(CMAKE_SYSTEM_NAME STREQUAL "Linux") | ||||||
|  |   check_include_files(sys/xattr.h HAVE_XATTR) | ||||||
|  | endif() | ||||||
|  |  | ||||||
| # Functions | # Functions | ||||||
| check_function_exists(fseeko HAVE_FSEEKO) | check_function_exists(fseeko HAVE_FSEEKO) | ||||||
|   | |||||||
| @@ -30,7 +30,7 @@ | |||||||
| #endif | #endif | ||||||
|  |  | ||||||
| #ifdef HAVE_XATTR | #ifdef HAVE_XATTR | ||||||
| # include <attr/xattr.h> | # include <sys/xattr.h> | ||||||
| # define XATTR_VAL_LEN 1024 | # define XATTR_VAL_LEN 1024 | ||||||
| #endif | #endif | ||||||
|  |  | ||||||
|   | |||||||
| @@ -992,6 +992,7 @@ endfunc | |||||||
|  |  | ||||||
| func Test_write_with_xattr_support() | func Test_write_with_xattr_support() | ||||||
|   CheckLinux |   CheckLinux | ||||||
|  |   CheckFeature xattr | ||||||
|   CheckExecutable setfattr |   CheckExecutable setfattr | ||||||
|  |  | ||||||
|   let contents = ["file with xattrs", "line two"] |   let contents = ["file with xattrs", "line two"] | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 zeertzjq
					zeertzjq