mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-16 08:40:06 +02:00
153 lines
5.3 KiB
Plaintext
153 lines
5.3 KiB
Plaintext
From 3872a82ad75bd16c48f659a17c3cdc823600cf6f Mon Sep 17 00:00:00 2001
|
|
From: David Karoly <david.karoly@outlook.com>
|
|
Date: Sat, 27 Nov 2021 21:24:06 +0000
|
|
Subject: fix build on Haiku
|
|
|
|
|
|
diff --git a/src/iperf_api.c b/src/iperf_api.c
|
|
index c104be1..efd3082 100644
|
|
--- a/src/iperf_api.c
|
|
+++ b/src/iperf_api.c
|
|
@@ -1183,7 +1183,7 @@ iperf_parse_arguments(struct iperf_test *test, int argc, char **argv)
|
|
test->json_output = 1;
|
|
break;
|
|
case 'v':
|
|
- printf("%s (cJSON %s)\n%s\n%s\n", version, cJSON_Version(), get_system_info(),
|
|
+ printf("%s (cJSON %s)\n%s\n%s\n", version, cJSON_Version(), do_get_system_info(),
|
|
get_optional_features());
|
|
exit(0);
|
|
case 's':
|
|
diff --git a/src/iperf_client_api.c b/src/iperf_client_api.c
|
|
index 5833068..fbe1a61 100644
|
|
--- a/src/iperf_client_api.c
|
|
+++ b/src/iperf_client_api.c
|
|
@@ -543,11 +543,11 @@ iperf_run_client(struct iperf_test * test)
|
|
|
|
if (test->json_output) {
|
|
cJSON_AddItemToObject(test->json_start, "version", cJSON_CreateString(version));
|
|
- cJSON_AddItemToObject(test->json_start, "system_info", cJSON_CreateString(get_system_info()));
|
|
+ cJSON_AddItemToObject(test->json_start, "system_info", cJSON_CreateString(do_get_system_info()));
|
|
} else if (test->verbose) {
|
|
iperf_printf(test, "%s\n", version);
|
|
iperf_printf(test, "%s", "");
|
|
- iperf_printf(test, "%s\n", get_system_info());
|
|
+ iperf_printf(test, "%s\n", do_get_system_info());
|
|
iflush(test);
|
|
}
|
|
|
|
diff --git a/src/iperf_server_api.c b/src/iperf_server_api.c
|
|
index 18f105d..919bedd 100644
|
|
--- a/src/iperf_server_api.c
|
|
+++ b/src/iperf_server_api.c
|
|
@@ -470,11 +470,11 @@ iperf_run_server(struct iperf_test *test)
|
|
|
|
if (test->json_output) {
|
|
cJSON_AddItemToObject(test->json_start, "version", cJSON_CreateString(version));
|
|
- cJSON_AddItemToObject(test->json_start, "system_info", cJSON_CreateString(get_system_info()));
|
|
+ cJSON_AddItemToObject(test->json_start, "system_info", cJSON_CreateString(do_get_system_info()));
|
|
} else if (test->verbose) {
|
|
iperf_printf(test, "%s\n", version);
|
|
iperf_printf(test, "%s", "");
|
|
- iperf_printf(test, "%s\n", get_system_info());
|
|
+ iperf_printf(test, "%s\n", do_get_system_info());
|
|
iflush(test);
|
|
}
|
|
|
|
diff --git a/src/iperf_util.c b/src/iperf_util.c
|
|
index d5795ee..9179fff 100644
|
|
--- a/src/iperf_util.c
|
|
+++ b/src/iperf_util.c
|
|
@@ -224,7 +224,7 @@ cpu_util(double pcpu[3])
|
|
}
|
|
|
|
const char *
|
|
-get_system_info(void)
|
|
+do_get_system_info(void)
|
|
{
|
|
static char buf[1024];
|
|
struct utsname uts;
|
|
diff --git a/src/iperf_util.h b/src/iperf_util.h
|
|
index b109af2..251e740 100644
|
|
--- a/src/iperf_util.h
|
|
+++ b/src/iperf_util.h
|
|
@@ -48,7 +48,7 @@ double timeval_diff(struct timeval *tv0, struct timeval *tv1);
|
|
|
|
void cpu_util(double pcpu[3]);
|
|
|
|
-const char* get_system_info(void);
|
|
+const char* do_get_system_info(void);
|
|
|
|
const char* get_optional_features(void);
|
|
|
|
--
|
|
2.37.3
|
|
|
|
|
|
From 3d99b89c22e77421fe03e814d61ca559f70337b5 Mon Sep 17 00:00:00 2001
|
|
From: David Karoly <david.karoly@outlook.com>
|
|
Date: Sat, 27 Nov 2021 21:58:25 +0000
|
|
Subject: set default to IPv4
|
|
|
|
|
|
diff --git a/src/iperf_sctp.c b/src/iperf_sctp.c
|
|
index 1040832..7cfb061 100644
|
|
--- a/src/iperf_sctp.c
|
|
+++ b/src/iperf_sctp.c
|
|
@@ -171,11 +171,11 @@ iperf_sctp_listen(struct iperf_test *test)
|
|
memset(&hints, 0, sizeof(hints));
|
|
/*
|
|
* If binding to the wildcard address with no explicit address
|
|
- * family specified, then force us to get an AF_INET6 socket.
|
|
+ * family specified, then force us to get an AF_INET socket.
|
|
* More details in the comments in netanounce().
|
|
*/
|
|
if (test->settings->domain == AF_UNSPEC && !test->bind_address) {
|
|
- hints.ai_family = AF_INET6;
|
|
+ hints.ai_family = AF_INET;
|
|
} else {
|
|
hints.ai_family = test->settings->domain;
|
|
}
|
|
diff --git a/src/iperf_tcp.c b/src/iperf_tcp.c
|
|
index 2a8222d..b4d8aae 100644
|
|
--- a/src/iperf_tcp.c
|
|
+++ b/src/iperf_tcp.c
|
|
@@ -178,11 +178,11 @@ iperf_tcp_listen(struct iperf_test *test)
|
|
|
|
/*
|
|
* If binding to the wildcard address with no explicit address
|
|
- * family specified, then force us to get an AF_INET6 socket.
|
|
+ * family specified, then force us to get an AF_INET socket.
|
|
* More details in the comments in netanounce().
|
|
*/
|
|
if (test->settings->domain == AF_UNSPEC && !test->bind_address) {
|
|
- hints.ai_family = AF_INET6;
|
|
+ hints.ai_family = AF_INET;
|
|
}
|
|
else {
|
|
hints.ai_family = test->settings->domain;
|
|
diff --git a/src/net.c b/src/net.c
|
|
index 1a88155..a59ee6f 100644
|
|
--- a/src/net.c
|
|
+++ b/src/net.c
|
|
@@ -265,7 +265,7 @@ netannounce(int domain, int proto, const char *local, const char *bind_dev, int
|
|
memset(&hints, 0, sizeof(hints));
|
|
/*
|
|
* If binding to the wildcard address with no explicit address
|
|
- * family specified, then force us to get an AF_INET6 socket. On
|
|
+ * family specified, then force us to get an AF_INET socket. On
|
|
* CentOS 6 and MacOS, getaddrinfo(3) with AF_UNSPEC in ai_family,
|
|
* and ai_flags containing AI_PASSIVE returns a result structure
|
|
* with ai_family set to AF_INET, with the result that we create
|
|
@@ -276,7 +276,7 @@ netannounce(int domain, int proto, const char *local, const char *bind_dev, int
|
|
* result structure is set to AF_INET6.
|
|
*/
|
|
if (domain == AF_UNSPEC && !local) {
|
|
- hints.ai_family = AF_INET6;
|
|
+ hints.ai_family = AF_INET;
|
|
}
|
|
else {
|
|
hints.ai_family = domain;
|
|
--
|
|
2.37.3
|
|
|