From a7b0e2367eabe6d719aba5de7c80cadcfe8ba04e Mon Sep 17 00:00:00 2001
From: Edric Milaret <edric.ladent-milaret@savoirfairelinux.com>
Date: Mon, 21 Mar 2016 10:41:51 -0400
Subject: [PATCH] fix compilation without upnp

Broken by 4a3835ad

Change-Id: Ifa624480d854fe7ad7acb6adc35a443b354e14d8
Tuleap: #492
---
 src/upnp/upnp_control.cpp | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/upnp/upnp_control.cpp b/src/upnp/upnp_control.cpp
index e2a2b58db1..4e3be9d604 100644
--- a/src/upnp/upnp_control.cpp
+++ b/src/upnp/upnp_control.cpp
@@ -46,8 +46,10 @@ Controller::~Controller()
 {
     /* remove all mappings */
     removeMappings();
+#if HAVE_LIBUPNP
     if (listToken_ and upnpContext_)
         upnpContext_->removeIGDListener(listToken_);
+#endif
 }
 
 bool
@@ -64,9 +66,11 @@ Controller::setIGDListener(IGDFoundCallback&& cb)
 {
     if (not upnpContext_)
         return;
+#if HAVE_LIBUPNP
     if (listToken_)
         upnpContext_->removeIGDListener(listToken_);
     listToken_ = cb ? upnpContext_->addIGDListener(std::move(cb)) : 0;
+#endif
 }
 
 bool
-- 
GitLab