mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-14 07:40:07 +02:00
49 lines
1.9 KiB
Plaintext
49 lines
1.9 KiB
Plaintext
From c56e47ea8692b5e679e4144b2017153e750ad381 Mon Sep 17 00:00:00 2001
|
|
From: Jerome Duval <jerome.duval@gmail.com>
|
|
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
|
|
|