ソースを参照

Fix compile error with --disable-bittorrent

Tatsuhiro Tsujikawa 9 年 前
コミット
8d30869966
1 ファイル変更6 行追加1 行削除
  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