Files
macports-ports/net/netperf/files/implicit.patch
Ryan SchmidtandPerry E. Metzger bb5b4fe058 netperf: Fix implicit func decls and wrong code
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
2022-01-10 16:18:58 -05:00

22 lines
583 B
Diff

Fix:
net_uuid.c:158:5: error: implicit declaration of function 'read' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
net_uuid.c:159:5: error: implicit declaration of function 'close' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
Part of:
https://github.com/HewlettPackard/netperf/commit/0b0cbbef75021134c83be0c3dd21878467e11144
--- src/net_uuid.c.orig
+++ src/net_uuid.c
@@ -29,6 +29,10 @@
#include <string.h>
#include <fcntl.h>
+#if defined(HAVE_UNISTD_H)
+#include <unistd.h>
+#endif
+
#if defined(HAVE_INTTYPES_H)
#include <inttypes.h>
#endif