1
0
mirror of https://github.com/pgbackrest/pgbackrest.git synced 2026-10-23 21:28:56 +03:00

Fix test harness build when libssh2 is not present.

The SFTP case in hrnHostConfig() calls storageSftpNewP(), which storage/sftp/storage.h only declares when libssh2 is present, so the harness failed to compile without it.

Compile the case out and leave the default case to assert that the storage is posix. The sftp repo type cannot be selected without libssh2 so the case is unreachable either way.
This commit is contained in:
David Steele
2026-08-18 21:21:59 +07:00
parent e6609b59be
commit 66edabb57b

View File

@@ -797,6 +797,8 @@ hrnHostConfig(HrnHost *const this)
break;
}
#ifdef HAVE_LIBSSH2
case STORAGE_SFTP_TYPE:
{
const String *const keyPrivate = strNewFmt("%s/" HRN_HOST_SFTP_KEY_PRIVATE, hrnPathRepo());
@@ -824,6 +826,8 @@ hrnHostConfig(HrnHost *const this)
break;
}
#endif // HAVE_LIBSSH2
default:
{
ASSERT(hrnHostLocal.storage == STORAGE_POSIX_TYPE);