[MacPorts] #62219: netperf @2.7.0: error: implicit declaration of function 'read' is invalid in C99
MacPorts
noreply at macports.org
Thu Feb 4 06:49:30 UTC 2021
#62219: netperf @2.7.0: error: implicit declaration of function 'read' is invalid
in C99
-----------------------------+------------------------
Reporter: ryandesign | Owner: grimreaper
Type: defect | Status: assigned
Priority: Normal | Milestone:
Component: ports | Version: 2.6.4
Keywords: catalina bigsur | Port: netperf
-----------------------------+------------------------
netperf does not build with Xcode 12 or later due to the well-known
implicit declaration of function problem.
https://build.macports.org/builders/ports-
11_arm64-builder/builds/10926/steps/install-port/logs/stdio
{{{
net_uuid.c:158:5: error: implicit declaration of function 'read' is
invalid in C99 [-Werror,-Wimplicit-function-declaration]
read(fd, seed, 16);
^
net_uuid.c:158:5: note: did you mean 'fread'?
/Library/Developer/CommandLineTools/SDKs/MacOSX11.0.sdk/usr/include/stdio.h:158:9:
note: 'fread' declared here
size_t fread(void * __restrict __ptr, size_t __size, size_t __nitems,
FILE * __restrict __stream);
^
net_uuid.c:159:5: error: implicit declaration of function 'close' is
invalid in C99 [-Werror,-Wimplicit-function-declaration]
close(fd);
^
}}}
The fix is to patch the code to include the system headers that define
these functions. Maybe upstream already fixed it; if so, we use their
patch. If not, we report it to them.
--
Ticket URL: <https://trac.macports.org/ticket/62219>
MacPorts <https://www.macports.org/>
Ports system for macOS
More information about the macports-tickets
mailing list