diff --git a/net-libs/libupnp/libupnp-1.6.19.recipe b/net-libs/libupnp/libupnp-1.6.19.recipe index 29644e047..1c0bd7e7e 100644 --- a/net-libs/libupnp/libupnp-1.6.19.recipe +++ b/net-libs/libupnp/libupnp-1.6.19.recipe @@ -24,6 +24,8 @@ if [ $effectiveTargetArchitecture != x86_gcc2 ]; then fi SECONDARY_ARCHITECTURES="x86" +PATCHES="libupnp-$portVersion.patchset" + PROVIDES=" libupnp$secondaryArchSuffix = $portVersion lib:libupnp$secondaryArchSuffix = 6.3.3 compat >= 6 diff --git a/net-libs/libupnp/patches/libupnp-1.6.19.patchset b/net-libs/libupnp/patches/libupnp-1.6.19.patchset new file mode 100644 index 000000000..ca23c66d7 --- /dev/null +++ b/net-libs/libupnp/patches/libupnp-1.6.19.patchset @@ -0,0 +1,48 @@ +From c56e47ea8692b5e679e4144b2017153e750ad381 Mon Sep 17 00:00:00 2001 +From: Jerome Duval +Date: Mon, 9 Feb 2015 20:43:28 +0000 +Subject: Haiku build fix + + +diff --git a/threadutil/src/ThreadPool.c b/threadutil/src/ThreadPool.c +index fcf7108..17715fc 100644 +--- a/threadutil/src/ThreadPool.c ++++ b/threadutil/src/ThreadPool.c +@@ -419,7 +419,7 @@ static void SetSeed(void) + srand((unsigned int)t.tv_usec + (unsigned int)ithread_get_current_thread_id().p); + #elif defined(BSD) || defined(__OSX__) || defined(__APPLE__) || defined(__FreeBSD_kernel__) + srand((unsigned int)t.tv_usec + (unsigned int)ithread_get_current_thread_id()); +-#elif defined(__linux__) || defined(__sun) || defined(__CYGWIN__) || defined(__GLIBC__) ++#elif defined(__linux__) || defined(__sun) || defined(__CYGWIN__) || defined(__GLIBC__) || defined(__HAIKU__) + srand((unsigned int)t.tv_usec + (unsigned int)ithread_get_current_thread_id()); + #else + { +diff --git a/upnp/src/api/upnpapi.c b/upnp/src/api/upnpapi.c +index cbd7aea..3429f59 100644 +--- a/upnp/src/api/upnpapi.c ++++ b/upnp/src/api/upnpapi.c +@@ -3438,6 +3438,10 @@ int UpnpGetIfInfo(const char *IfName) + inet_ntop(AF_INET, &v4_addr, gIF_IPV4, sizeof(gIF_IPV4)); + inet_ntop(AF_INET6, &v6_addr, gIF_IPV6, sizeof(gIF_IPV6)); + gIF_INDEX = if_nametoindex(gIF_NAME); ++#elif defined(__HAIKU__) ++ UpnpPrintf(UPNP_CRITICAL, API, __FILE__, __LINE__, ++ "failed to find list of addresses\n"); ++ return UPNP_E_INIT; + #else + char szBuffer[MAX_INTERFACES * sizeof(struct ifreq)]; + struct ifconf ifConf; +@@ -3900,6 +3904,10 @@ int getlocalhostname(char *out, size_t out_len) + freeifaddrs(ifap); + + ret = ifa ? UPNP_E_SUCCESS : UPNP_E_INIT; ++#elif defined(__HAIKU__) ++ UpnpPrintf(UPNP_CRITICAL, API, __FILE__, __LINE__, ++ "failed to find list of addresses\n"); ++ return UPNP_E_INIT; + #else + char szBuffer[MAX_INTERFACES * sizeof (struct ifreq)]; + struct ifconf ifConf; +-- +1.8.3.4 +