diff options
author | zeertzjq <zeertzjq@outlook.com> | 2023-09-30 21:19:12 +0800 |
---|---|---|
committer | zeertzjq <zeertzjq@outlook.com> | 2023-09-30 22:09:55 +0800 |
commit | 5c60fbe9db0005d10d87ba60a981fd41f85f8df5 (patch) | |
tree | cea40ee1e822576a21ed3ef7d00ef474186f5720 | |
parent | f6e72c3dfed83b02483976eaedb27819df9a878d (diff) | |
download | rneovim-5c60fbe9db0005d10d87ba60a981fd41f85f8df5.tar.gz rneovim-5c60fbe9db0005d10d87ba60a981fd41f85f8df5.tar.bz2 rneovim-5c60fbe9db0005d10d87ba60a981fd41f85f8df5.zip |
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
https://github.com/vim/vim/commit/6de4e58cf27a3bb6e81653ca63b77e29d1bb46f2
-rw-r--r-- | cmake.config/CMakeLists.txt | 4 | ||||
-rw-r--r-- | src/nvim/os/fs.c | 2 | ||||
-rw-r--r-- | test/old/testdir/test_writefile.vim | 1 |
3 files changed, 5 insertions, 2 deletions
diff --git a/cmake.config/CMakeLists.txt b/cmake.config/CMakeLists.txt index 85d49e330e..1b175475ee 100644 --- a/cmake.config/CMakeLists.txt +++ b/cmake.config/CMakeLists.txt @@ -36,11 +36,13 @@ check_symbol_exists(_NSGetEnviron crt_externs.h HAVE__NSGETENVIRON) # Headers check_include_files(langinfo.h HAVE_LANGINFO_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(termios.h HAVE_TERMIOS_H) check_include_files(sys/uio.h HAVE_SYS_UIO_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 check_function_exists(fseeko HAVE_FSEEKO) diff --git a/src/nvim/os/fs.c b/src/nvim/os/fs.c index 3efb575039..93cc7de040 100644 --- a/src/nvim/os/fs.c +++ b/src/nvim/os/fs.c @@ -30,7 +30,7 @@ #endif #ifdef HAVE_XATTR -# include <attr/xattr.h> +# include <sys/xattr.h> # define XATTR_VAL_LEN 1024 #endif diff --git a/test/old/testdir/test_writefile.vim b/test/old/testdir/test_writefile.vim index 62ec901dbf..df993feb62 100644 --- a/test/old/testdir/test_writefile.vim +++ b/test/old/testdir/test_writefile.vim @@ -992,6 +992,7 @@ endfunc func Test_write_with_xattr_support() CheckLinux + CheckFeature xattr CheckExecutable setfattr let contents = ["file with xattrs", "line two"] |