mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-08 21:00:05 +02:00
48 lines
1.2 KiB
Plaintext
48 lines
1.2 KiB
Plaintext
From 01e99cadf10d3a60377bc22f0ccf42c6a2b7441f Mon Sep 17 00:00:00 2001
|
|
From: begasus <begasus@gmail.com>
|
|
Date: Sun, 27 Nov 2022 12:27:09 +0100
|
|
Subject: Fix undeclared SIOCGIFCONF
|
|
|
|
|
|
diff --git a/src/tools/networkTools.cpp b/src/tools/networkTools.cpp
|
|
index 01c3e95..191eb85 100644
|
|
--- a/src/tools/networkTools.cpp
|
|
+++ b/src/tools/networkTools.cpp
|
|
@@ -43,6 +43,10 @@
|
|
#include <netdb.h>
|
|
#endif
|
|
|
|
+#ifdef __HAIKU__
|
|
+#include <sys/sockio.h>
|
|
+#endif
|
|
+
|
|
size_t write_callback_to_iss(char* ptr, size_t size, size_t nmemb, void* userdata)
|
|
{
|
|
auto str = static_cast<std::stringstream*>(userdata);
|
|
--
|
|
2.37.3
|
|
|
|
|
|
From ebe718696234086fcc694b36bc4f65ae085f4a5b Mon Sep 17 00:00:00 2001
|
|
From: begasus <begasus@gmail.com>
|
|
Date: Sun, 27 Nov 2022 12:28:36 +0100
|
|
Subject: Fix for getifaddrs
|
|
|
|
|
|
diff --git a/test/httplib.h b/test/httplib.h
|
|
index 57b84ea..ca43408 100644
|
|
--- a/test/httplib.h
|
|
+++ b/test/httplib.h
|
|
@@ -1516,7 +1516,7 @@ inline bool bind_ip_address(socket_t sock, const char *host) {
|
|
}
|
|
|
|
inline std::string if2ip(const std::string &ifn) {
|
|
-#ifndef _WIN32
|
|
+#if !defined(_WIN32) && !defined(__HAIKU__)
|
|
struct ifaddrs *ifap;
|
|
getifaddrs(&ifap);
|
|
for (auto ifa = ifap; ifa; ifa = ifa->ifa_next) {
|
|
--
|
|
2.37.3
|
|
|