mirror of
https://github.com/macports/macports-ports.git
synced 2026-07-12 18:20:25 -07:00
Fix implicit declaration of functions which caused build failure with Xcode 12 and later. Fix invocation of mach_port_deallocate which was called with 1 argument but needs 2. I assume this change is correct but I don't know. Closes: https://trac.macports.org/ticket/62219
27 lines
802 B
Diff
27 lines
802 B
Diff
Fix:
|
|
|
|
netcpu_osx.c:73:3: error: implicit declaration of function 'mach_port_deallocate' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
|
|
netcpu_osx.c:73:37: error: too few arguments to function call, expected 2, have 1
|
|
|
|
https://github.com/HewlettPackard/netperf/pull/67
|
|
--- src/netcpu_osx.c.orig 2015-07-20 12:39:35.000000000 -0500
|
|
+++ src/netcpu_osx.c 2022-01-06 12:22:50.000000000 -0600
|
|
@@ -48,7 +48,7 @@
|
|
SnowLeopard (10.6) happy, we hope it does not anger previous
|
|
versions */
|
|
#include <mach/mach_host.h>
|
|
-/* #include <mach/mach_port.h> */
|
|
+#include <mach/mach_port.h>
|
|
|
|
#include "netsh.h"
|
|
#include "netlib.h"
|
|
@@ -70,7 +70,7 @@
|
|
void
|
|
cpu_util_terminate(void)
|
|
{
|
|
- mach_port_deallocate(lib_host_port);
|
|
+ mach_port_deallocate(mach_task_self(), lib_host_port);
|
|
return;
|
|
}
|
|
|