mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-21 03:00:05 +02:00
128 lines
3.6 KiB
Plaintext
128 lines
3.6 KiB
Plaintext
From 16d30832c4904176ed3da24722479af76ff9768d Mon Sep 17 00:00:00 2001
|
|
From: =?UTF-8?q?Zolt=C3=A1n=20Mizsei?= <zmizsei@extrowerk.com>
|
|
Date: Sat, 4 Nov 2017 12:28:39 +0100
|
|
Subject: Haiku got no IP_MREQN
|
|
|
|
|
|
diff --git a/minissdpc.c b/minissdpc.c
|
|
index 3479de8..8d9aebc 100644
|
|
--- a/minissdpc.c
|
|
+++ b/minissdpc.c
|
|
@@ -67,7 +67,7 @@ struct sockaddr_un {
|
|
#define PRINT_SOCKET_ERROR(x) perror(x)
|
|
#endif
|
|
|
|
-#if !defined(__DragonFly__) && !defined(__OpenBSD__) && !defined(__NetBSD__) && !defined(__APPLE__) && !defined(_WIN32) && !defined(__CYGWIN__) && !defined(__sun) && !defined(__GNU__) && !defined(__FreeBSD_kernel__)
|
|
+#if !defined(__DragonFly__) && !defined(__OpenBSD__) && !defined(__NetBSD__) && !defined(__APPLE__) && !defined(_WIN32) && !defined(__CYGWIN__) && !defined(__sun) && !defined(__GNU__) && !defined(__FreeBSD_kernel__) && !defined(__HAIKU__)
|
|
#define HAS_IP_MREQN
|
|
#endif
|
|
|
|
--
|
|
2.14.2
|
|
|
|
|
|
From 6469b592119544458368771223bfbf58ae8e8b7c Mon Sep 17 00:00:00 2001
|
|
From: =?UTF-8?q?Zolt=C3=A1n=20Mizsei?= <zmizsei@extrowerk.com>
|
|
Date: Sat, 4 Nov 2017 12:35:06 +0100
|
|
Subject: On Haiku SIOCGIFADDR lives in sys/sockio.h
|
|
|
|
|
|
diff --git a/minissdpc.c b/minissdpc.c
|
|
index 8d9aebc..f492a27 100644
|
|
--- a/minissdpc.c
|
|
+++ b/minissdpc.c
|
|
@@ -75,6 +75,8 @@ struct sockaddr_un {
|
|
#include <sys/ioctl.h>
|
|
#if defined(__sun)
|
|
#include <sys/sockio.h>
|
|
+#elif defined(__HAIKU__)
|
|
+#include <sys/sockio.h>
|
|
#endif
|
|
#endif
|
|
|
|
--
|
|
2.14.2
|
|
|
|
|
|
From ced64c1ef646fdce2a7a674514a4fba93ba33e0c Mon Sep 17 00:00:00 2001
|
|
From: =?UTF-8?q?Zolt=C3=A1n=20Mizsei?= <zmizsei@extrowerk.com>
|
|
Date: Sat, 4 Nov 2017 12:38:06 +0100
|
|
Subject: atoui was already taken
|
|
|
|
|
|
diff --git a/portlistingparse.c b/portlistingparse.c
|
|
index d1954f5..ac0ced7 100644
|
|
--- a/portlistingparse.c
|
|
+++ b/portlistingparse.c
|
|
@@ -31,7 +31,7 @@ static const struct {
|
|
|
|
/* Helper function */
|
|
static UNSIGNED_INTEGER
|
|
-atoui(const char * p, int l)
|
|
+atoui2(const char * p, int l)
|
|
{
|
|
UNSIGNED_INTEGER r = 0;
|
|
while(l > 0 && *p)
|
|
@@ -107,7 +107,7 @@ data(void * d, const char * data, int l)
|
|
pm->remoteHost[l] = '\0';
|
|
break;
|
|
case NewExternalPort:
|
|
- pm->externalPort = (unsigned short)atoui(data, l);
|
|
+ pm->externalPort = (unsigned short)atoui2(data, l);
|
|
break;
|
|
case NewProtocol:
|
|
if(l > 3)
|
|
@@ -116,21 +116,21 @@ data(void * d, const char * data, int l)
|
|
pm->protocol[l] = '\0';
|
|
break;
|
|
case NewInternalPort:
|
|
- pm->internalPort = (unsigned short)atoui(data, l);
|
|
+ pm->internalPort = (unsigned short)atoui2(data, l);
|
|
break;
|
|
case NewInternalClient:
|
|
memcpy(pm->internalClient, data, l);
|
|
pm->internalClient[l] = '\0';
|
|
break;
|
|
case NewEnabled:
|
|
- pm->enabled = (unsigned char)atoui(data, l);
|
|
+ pm->enabled = (unsigned char)atoui2(data, l);
|
|
break;
|
|
case NewDescription:
|
|
memcpy(pm->description, data, l);
|
|
pm->description[l] = '\0';
|
|
break;
|
|
case NewLeaseTime:
|
|
- pm->leaseTime = atoui(data, l);
|
|
+ pm->leaseTime = atoui2(data, l);
|
|
break;
|
|
default:
|
|
break;
|
|
--
|
|
2.14.2
|
|
|
|
|
|
From adbacfa365ac35160e44a485b50c5113301eb859 Mon Sep 17 00:00:00 2001
|
|
From: =?UTF-8?q?Zolt=C3=A1n=20Mizsei?= <zmizsei@extrowerk.com>
|
|
Date: Sat, 4 Nov 2017 12:41:17 +0100
|
|
Subject: Haiku got networking stuffs in -lnetwork
|
|
|
|
|
|
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
|
index adb30ef..28ec485 100644
|
|
--- a/CMakeLists.txt
|
|
+++ b/CMakeLists.txt
|
|
@@ -106,6 +106,10 @@ if (WIN32)
|
|
# set (LDLIBS ${SOCKET_LIBRARY} ${NSL_LIBRARY} ${RESOLV_LIBRARY} ${LDLIBS})
|
|
endif (WIN32)
|
|
|
|
+if (HAIKU)
|
|
+ list(APPEND LDLIBS -lnetwork)
|
|
+endif (HAIKU)
|
|
+
|
|
if (NOT UPNPC_BUILD_STATIC AND NOT UPNPC_BUILD_SHARED)
|
|
message (FATAL "Both shared and static libraries are disabled!")
|
|
endif (NOT UPNPC_BUILD_STATIC AND NOT UPNPC_BUILD_SHARED)
|
|
--
|
|
2.14.2
|
|
|