patch from AC to solve compilation w.r.t. patched libupnp whatever the version number. Should work on debian as well.

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@5819 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
csoler 2012-11-14 20:24:07 +00:00
parent 40b80c4e84
commit 7fa9dbb2b1
2 changed files with 11 additions and 3 deletions

View File

@ -218,6 +218,14 @@ linux-* {
#CONFIG += version_detail_bash_script
# Check if the system's libupnp has been Debian-patched
system(grep -E 'char[[:space:]]+PublisherUrl' $${UPNP_DIR}/upnp.h &>/dev/null) {
# Normal libupnp
} else {
# Patched libupnp or new unreleased version
DEFINES *= PATCHED_LIBUPNP
}
DEFINES *= UBUNTU
INCLUDEPATH += /usr/include/glib-2.0/ /usr/lib/glib-2.0/include
LIBS *= -lgnome-keyring

View File

@ -1477,7 +1477,7 @@ upnpEventSubscriptionExpired:
int TimeOut = 1801;
int ret = UpnpSubscribe(
upnpCP->m_UPnPClientHandle,
#if UPNP_VERSION >= 10617
#ifdef PATCHED_LIBUPNP
UpnpString_get_String(es_event->PublisherUrl),
#else
es_event->PublisherUrl,
@ -1490,7 +1490,7 @@ upnpEventSubscriptionExpired:
msg, es_event->ErrCode, NULL, NULL);
} else {
ServiceMap::iterator it =
#if UPNP_VERSION >= 10617
#ifdef PATCHED_LIBUPNP
upnpCP->m_ServiceMap.find(UpnpString_get_String(es_event->PublisherUrl));
#else
upnpCP->m_ServiceMap.find(es_event->PublisherUrl);
@ -1500,7 +1500,7 @@ upnpEventSubscriptionExpired:
service.SetTimeout(TimeOut);
service.SetSID(newSID);
std::cerr << "CUPnPControlPoint::Callback() Re-subscribed to EventURL '" <<
#if DEBIAN && UPNP_VERSION >= 10617 || UPNP_VERSION >= 10800
#ifdef PATCHED_LIBUPNP
UpnpString_get_String(es_event->PublisherUrl) <<
#else
es_event->PublisherUrl <<