Pārlūkot izejas kodu

Fix compile error with --disable-bittorrent

Tatsuhiro Tsujikawa 9 gadi atpakaļ
vecāks
revīzija
8d30869966
1 mainītis faili ar 6 papildinājumiem un 1 dzēšanām
  1. 6 1
      src/RequestGroup.cc

+ 6 - 1
src/RequestGroup.cc

@@ -1264,10 +1264,15 @@ void RequestGroup::enableSeedOnly()
   }
 }
 
-bool RequestGroup::isSeeder() const {
+bool RequestGroup::isSeeder() const
+{
+#ifdef ENABLE_BITTORRENT
   return downloadContext_->hasAttribute(CTX_ATTR_BT) &&
          !bittorrent::getTorrentAttrs(downloadContext_)->metadata.empty() &&
          downloadFinished();
+#else  // !ENABLE_BITTORRENT
+  return false;
+#endif // !ENABLE_BITTORRENT
 }
 
 } // namespace aria2