summaryrefslogtreecommitdiff
path: root/src/FeatureConfig.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/FeatureConfig.cc')
-rw-r--r--src/FeatureConfig.cc19
1 files changed, 18 insertions, 1 deletions
diff --git a/src/FeatureConfig.cc b/src/FeatureConfig.cc
index 1d2d30bb..1b5b183a 100644
--- a/src/FeatureConfig.cc
+++ b/src/FeatureConfig.cc
@@ -67,7 +67,9 @@
#ifdef HAVE_SYS_UTSNAME_H
# include <sys/utsname.h>
#endif // HAVE_SYS_UTSNAME_H
-
+#ifdef HAVE_LIBSSH2
+# include <libssh2.h>
+#endif // HAVE_LIBSSH2
#include "util.h"
namespace aria2 {
@@ -80,6 +82,8 @@ uint16_t getDefaultPort(const std::string& protocol)
return 443;
} else if(protocol == "ftp") {
return 21;
+ } else if(protocol == "sftp") {
+ return 22;
} else {
return 0;
}
@@ -166,6 +170,14 @@ const char* strSupportedFeature(int feature)
#endif // !ENABLE_XML_RPC
break;
+ case(FEATURE_SFTP):
+#ifdef HAVE_LIBSSH2
+ return "SFTP";
+#else // !HAVE_LIBSSH2
+ return nullptr;
+#endif // !HAVE_LIBSSH2
+ break;
+
default:
return nullptr;
}
@@ -221,6 +233,11 @@ std::string usedLibs()
#ifdef HAVE_LIBCARES
res += "c-ares/" ARES_VERSION_STR " ";
#endif // HAVE_LIBCARES
+
+#ifdef HAVE_LIBSSH2
+ res += "libssh2/" LIBSSH2_VERSION " ";
+#endif // HAVE_LIBSSH2
+
if(!res.empty()) {
res.erase(res.length()-1);
}