From b69168cfb5fa1985323fe9d856e563125b8b4ef3 Mon Sep 17 00:00:00 2001 From: Andrew Borodin Date: Sun, 18 Dec 2022 18:51:29 +0300 Subject: [PATCH] Ticket #4420: fail to build with only SFTP network VFS enabled. * m4.include/mc-vfs.m4: use $enable_vfs_sftp to test functions required for network VFSes. Define ENABLE_VFS_NET preprocessor macro here... * lib/vfs/vfs.h: ...not here. Signed-off-by: Andrew Borodin --- lib/vfs/vfs.h | 4 ---- m4.include/mc-vfs.m4 | 3 ++- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/lib/vfs/vfs.h b/lib/vfs/vfs.h index b2d3a80b4..27c77b65d 100644 --- a/lib/vfs/vfs.h +++ b/lib/vfs/vfs.h @@ -27,10 +27,6 @@ #define VFS_CLASS(a) ((struct vfs_class *) (a)) -#if defined (ENABLE_VFS_FTP) || defined (ENABLE_VFS_FISH) -#define ENABLE_VFS_NET 1 -#endif - /** * This is the type of callback function passed to vfs_fill_names. * It gets the name of the virtual file system as its first argument. diff --git a/m4.include/mc-vfs.m4 b/m4.include/mc-vfs.m4 index 96c07d1e8..f14fcfeec 100644 --- a/m4.include/mc-vfs.m4 +++ b/m4.include/mc-vfs.m4 @@ -44,6 +44,7 @@ AC_DEFUN([mc_ENABLE_VFS_NET], AC_CHECK_RPC enable_vfs_net=yes + AC_DEFINE(ENABLE_VFS_NET, [1], [Define to enable network VFSes support]) fi ]) @@ -79,7 +80,7 @@ AC_DEFUN([mc_VFS_CHECKS], AM_CONDITIONAL(ENABLE_VFS, [test x"$enable_vfs" = x"yes"]) - if test x"$enable_vfs_ftp" = x"yes" -o x"$enable_vfs_fish" = x"yes"; then + if test x"$enable_vfs_ftp" = x"yes" -o x"$enable_vfs_fish" = x"yes" -o x"$enable_vfs_sftp" = x"yes"; then mc_ENABLE_VFS_NET fi